Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I must have missed something, but it seems to me that it's quite painful to add an event handler in C#. I tried this

 

this.Closing += new System.EventHandler(this.frmMain_Closing);

in the InitializeComponent() method.

 

My handler looks like this :

 

private void frmMain_Closing(object sender, System.ComponentModel.CancelEventArgs e)

 

But I always get an error. It must be the param types, but I don't know how to set it right.

 

I'm working with Framework 1.0 (VS 2002)

 

Can anyone help me please ?

Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone!

--Homer Simpson

Posted
Thanks ! That was just what I needed.

Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone!

--Homer Simpson

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