eventHandler called when the form is just loaded and showed????

Macaco

Freshman
Joined
Jul 5, 2004
Messages
39
Hello,

I need to find an eventHandler to call my function when the form and all its components are just loaded and showed.

I looked at MSDN but I don't find anyone, it must be one!
Help needed, thanks!
 
I thied to use Visiblechanged event (with the form and woth a component inside the form) calling a function with a simple MessageBox:Show, and it shows it before the form is shown...

and Visiblechanged event is the last thing I define... :(
 
Well, I solved it, it's not a nice way but It works fine!!!!!!!!,

I just wanted to call the Loop function once all is loaded, so... because of I have a panel inside the form I call my loop function when the panel first paint handler calls its function:

with first_time boolean variable I will control that I will only be done once.


Void panel_x_Paint(System::Object * sender, System::Windows::Forms::PaintEventArgs * e)
{

if (first_time) {
first_time = false;
LoopFunction();
}
}


simple and effective.
 
Back
Top