表格中的事件 [英] Events in a form

查看:81
本文介绍了表格中的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


有人可以告诉我在表格显示后会立即触发哪些事件

显示在屏幕上吗?

Ta


Phil

Hello

Can anybody tell me which events are fired immediately after a form is
displayed i.e. appears on screen?

Ta

Phil

推荐答案

Phil,


隐藏或显示表单时,应触发VisibleChanged事件。

首次显示表单时,应触发Load事件。


希望这会有所帮助。

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


" Phil" < putitinthepost @无处>在留言中写道

news:41 ********************** @ news.dial.pipex.com。 ..
Phil,

When a form is hidden or shown, the VisibleChanged event should fire.
When a form is shown for the first time, the Load event should fire.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Phil" <putitinthepost@nowhere> wrote in message
news:41**********************@news.dial.pipex.com. ..
你好

任何人都可以告诉我在表格显示后会立即触发哪些事件,即显示在屏幕上?

Ta

Phil
Hello

Can anybody tell me which events are fired immediately after a form is
displayed i.e. appears on screen?

Ta

Phil



谢谢Nicholas的快速回复。


不幸的是在尝试了这两种方法后,它并没有解决我的问题。

我想要做的是显示一个模态对话框

主表单后立即可见。如果我将模态对话框调用放入Load

或Visible更改,则会出现对话框,但调用表单在关闭之前不会出现




您或其他人可以建议我如何做到这一点吗?


Phil

" Nicholas Paldino [.NET / C#MVP]" < mv*@spam.guard.caspershouse.com>写在

消息新闻:OK ************** @ TK2MSFTNGP12.phx.gbl ...
Thank you Nicholas for your prompt reply.

Unfortunately, after trying both methods it doesn''t solve the problem I
have.

What I''m trying to do is to display a Modal dialog immediately after the
main form has become visible. If I put the modal dialog call in either Load
or Visible changed, the dialog appears but the calling form doesn not appear
until after it has been closed.

Can you, or others, suggest how I can do this?

Phil
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OK**************@TK2MSFTNGP12.phx.gbl...
Phil,
隐藏或显示表单时,应触发VisibleChanged事件。
第一次显示表单时,应该触发Load事件。

希望这有助于。

-
- Nicholas Paldino [.NET / C#MVP]
- mv *@spam.guard.caspershouse.com

菲尔 < putitinthepost @无处>在消息中写道
新闻:41 ********************** @ news.dial.pipex.com。 ..
Phil,

When a form is hidden or shown, the VisibleChanged event should fire.
When a form is shown for the first time, the Load event should fire.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Phil" <putitinthepost@nowhere> wrote in message
news:41**********************@news.dial.pipex.com. ..
你好

任何人都可以告诉我在表格显示后会立即触发哪些事件,即显示在屏幕上?

Ta

Phil
Hello

Can anybody tell me which events are fired immediately after a form is
displayed i.e. appears on screen?

Ta

Phil




2004年12月16日星期四15:21:47 -0000 ,Phil写道:
On Thu, 16 Dec 2004 15:21:47 -0000, Phil wrote:
你好

任何人都可以告诉我在表格显示后即会立即触发哪些事件,即出现在屏幕上?
Hello

Can anybody tell me which events are fired immediately after a form is
displayed i.e. appears on screen?




这是Activated事件。小心,每次在屏幕上显示

表格时都会引发此事件,而不仅仅是第一次显示(对于

示例,在被另一个人隐藏之后)形成然后再次回到

前面,Activated事件将被触发)。因此,当您捕获此事件时,请务必删除

事件处理程序,以便它不会再次获取



That''s the Activated event. Be careful, this event is raised each time the
form is shown on the screen, not only the first time it is shown (for
example, after being hidden by another form and then brough back to the
front again, the Activated event will be fired). So take care of removing
the event handler when you catch this event in order for it not to be
catched again.

这篇关于表格中的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆