Click to See Complete Forum and Search --> : Event handler


savagerx
May 15th, 2003, 11:05 PM
just wondering if we can make an event handler call another event handler.

MyButton.clicks += new EventHandler(MyButton_Click);

//how do we make MyButton_Click() call yet another MyButton_Click2()?

because if I use MyButton.clicks += new EventHandler(MyButton_Click2()), it does not guarantee that MyButton_Click will execute before MyButton_Click2.

What advice do you have?

pareshgh
May 16th, 2003, 01:18 AM
from your question looks like you want to invoke an event with in an event.
you will need to pass the sender object and the event object.

plz specify the question and expected answer further to help your needs.

-Paresh

pareshgh
May 16th, 2003, 11:21 AM
and also to add plz check design patterns with menu , buttons etc and event handling with it on MSDN (http://msdn.microsoft.com/msdnmag/issues/02/10/CommandManagement/default.aspx)


Paresh