Hi juli,
If you double click on the Form the designer will add a handler to the default event for that control as well as the method.
You can also add it manually
this.Load += new System.EventHandler(this.Form1_Load);
private void Form1_Load(object sender, EventArgs e)
{
// Add code here
}
Or, since you most likely are coding inside the Form1 class
protected override void OnLoad(EventArgs e)
{
// Add code here, note no += EventHandler needed
}
On Mon, 09 May 2005 18:38:31 +0200, juli jul <ju******@yahoo.com> wrote:
Hello,
I created a form and excpected to see in a windows designer generated
code something like this:
this.Load += new System.EventHandler(this.Form1_Load);
as I saw in other projects.
But I don't see it and I need it in order to do things while the form
loading.
How can I add it and where it appears?
Thank you!
*** Sent via Developersdex http://www.developersdex.com ***
--
Happy coding!
Morten Wennevik [C# MVP]