System.Windows.Forms.Form 
Author Message
 System.Windows.Forms.Form

Hello,

        I have created a form using System.Windows.Forms.Form.
        I'd like to add a Close event handler of the form.
        Is there any example?

Regards,
ccm.



Tue, 17 May 2005 15:54:35 GMT  
 System.Windows.Forms.Form
There is an event for exactly this purpose, called (oddly enough) Closing.

You can have the designer add the event to you form (click on the form, then
double click the event in the properties tab), or add code like this
yourself;

this.Closing += new
System.ComponentModel.CancelEventHandler(this.MyForm_Closing);

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

Quote:
}

--
Nick Holmes
Coyote Software, GmbH.


Quote:
> Hello,

>         I have created a form using System.Windows.Forms.Form.
>         I'd like to add a Close event handler of the form.
>         Is there any example?

> Regards,
> ccm.



Tue, 17 May 2005 17:41:38 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. system.windows.forms.form.show()

2. Displaying XML in a System.Windows.Forms.Form control

3. Extending System.Windows.Forms.Form?

4. System.WinForms / System.Windows.Forms

5. Make Windows Form Application with VC++.NET 2002 using a visual form

6. How to convert System.Windows.Forms.Message to System.Windows.Forms.Keys?

7. classes that inherit from Windows.Forms.Form - problem with View Designer

8. Windows Forms to Web Forms

9. Web form textbox Vs Windows form textbox.....

10. Need to keep a windows form as the topmost form

11. override System.Windows.Forms.Treenode.Text

12. System.Windows.Forms & Inheritance problem

 

 
Powered by phpBB® Forum Software