Jump to content
Xtreme .Net Talk

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


Recommended Posts

Posted

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!

Posted

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... :(

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...