Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Starting a Process in the Form Load Event
Message
 
To
10/08/2005 13:19:48
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01039934
Message ID:
01041207
Views:
24
Paul,
The Load() event is fired before the form is displayed. If you want to run your process after the form is displayed you will need to use the Activated() event or similar. I would add code in the event handler to make sure that your process is only run once (if that is the case). Something like this:
private void Form1_Activated(object sender, System.EventArgs e)
{
	if (!this.lHasBeenActivatedAlready)
	{
		this.lHasBeenActivatedAlready = true;
		MessageBox.Show("Run my process");
	}
}
Hope this helps.

Einar

>I have a winforms app that will gather some data from a fox 2.6 app and then communicate with a webservice , do some processing and then update tables in the 2.6 app.
>
>What I am trying to figure out how to do is have the form show and then start to process so that a progress bar is visible to the user and then close after completion of the process. I guess I could use a timer to allow the form to show and then start processing. Or perhaps is there another event besides form load that would kick off my event processing without user intervention. Any other ideas or suggestions on how to accompish this?
>
>Thanks,
>Paul
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform