By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,671 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,671 IT Pros & Developers. It's quick & easy.

Event AfterLoaded

P: n/a
How can I catch the event of AfterLoad of the form?
I want to do something AFTER the form loaded and shown to user, how to do
this?
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Found an answer:
For anyone interested : just override WndProc and override
WM_ACTIVATE

"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:uC**************@TK2MSFTNGP11.phx.gbl...
How can I catch the event of AfterLoad of the form?
I want to do something AFTER the form loaded and shown to user, how to do
this?

Nov 15 '05 #2

P: n/a

Hi Tamir,

I am glad you find what you want. But, I still want to add some information
for you. :-)

================================================== ======
The WM_ACTIVATE message is sent to both the window being activated and the
window being deactivated. If you want to determine it is activating or
deactivating, you should refer to this message's wParam, If the low-order
word of wParam is WA_INACTIVE, lParam is the handle to the window being
activated. If the low-order word of wParam is WA_ACTIVE or WA_CLICKACTIVE,
lParam is the handle to the window being deactivated.

For details, please refer to:
http://msdn.microsoft.com/library/de...us/winui/WinUI
/WindowsUserInterface/UserInput/KeyboardInput/KeyboardInputReference/Keyboar
dInputMessages/WM_ACTIVATE.asp

In .Net, the Form class has encapsulated this message, and already
distinguish it into 2 events, Form.Activated Event and Form.Deactivate
Event. I think, these 2 events may be more suitable for you. :-)

Also, you should be aware of that Activated event is not only fires after
the Load event, it occurs every time when the form is activated in code or
by the user. For more information, please refer it in your MSDN document.

================================================== =====

Hope these help you. If you have further concern, please feel free to post,
I will work with you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.