C# handling Form events

  • Thread starter Thread starter sravan_reddy001
  • Start date Start date
S

sravan_reddy001

how can we handle the FormClosed and FormClosing events in C#
i am able find those events in VB.NET application Code part.(Form1
Events)

i don't find that in the C3 how can i handle those events
 
how can we handle the FormClosed and FormClosing events in C#
i am able find those events in VB.NET application Code part.(Form1
Events)

i don't find that in the C3 how can i handle those events

You can write the code explicitly, for example:

Form form = /* some initialization here */;

form.Closed += MyEventHandlerMethod;

Or you can find the list of events in the properties window by clicking on
the "Events" button (looks like a lightning bolt). Double-click in an
event's edit box to have a new empty event handler created and added to
the event.

Pete
 
If you are working in a form class, override OnClosed and OnClosing instead.

Best regards,

Benny
 
Back
Top