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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top