how to call an event from an another event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi friends
I need to call an event (private void groupBox4_Enter(object sender, System.EventArgs e)) from an another event (private void Appexit_Closing(object sender, System.ComponentModel.CancelEventArgs e)),first of all is it possible to call an event from an another event? basically how to call an event? ....
hey Philip Rieck r u there

--- seash
 
Hi seash

'groupBox4_Enter' and 'Appexit_Closing' are basically normal functions. They become 'eventhandlers' when they are hooked to some events.

If you need to execute 'groupBox4_Enter' you can directly call that function and pass appropriate parameters. So in your case you would do it as followin

private void Appexit_Closing(object sender, System.ComponentModel.CancelEventArgs e

....................
groupBox4_Enter(sender, new System.EventArgs()) ;
......................


thank
Nithin P V

----- seash wrote: ----

hi friends
I need to call an event (private void groupBox4_Enter(object sender, System.EventArgs e)) from an another event (private void Appexit_Closing(object sender, System.ComponentModel.CancelEventArgs e)),first of all is it possible to call an event from an another event? basically how to call an event? ....
hey Philip Rieck r u there

--- seash
 
Back
Top