hi,
based on this sample, events are fired according
to the sequence of subscription.
using System;
using System.Componen tModel;
using System.Drawing;
using System.Windows. Forms;
public class WindowsForm : System.Windows. Forms.Form
{
private Button btn = new Button();
public static void Main()
{
Application.Run (new WindowsForm());
}
public WindowsForm()
{
btn.Click += new EventHandler(bt nClick1);
btn.Click += new EventHandler(bt nClick3);
btn.Click += new EventHandler(bt nClick2);
btn.Text = "Click";
this.Controls.A dd(btn);
}
private void btnClick1(objec t sender, EventArgs e)
{
MessageBox.Show ("1");
}
private void btnClick2(objec t sender, EventArgs e)
{
MessageBox.Show ("2");
}
private void btnClick3(objec t sender, EventArgs e)
{
MessageBox.Show ("3");
}
}
HTH,
--
gani
http://thedeveloperscorner.com.ph -----Original Message-----
i registered two events with a button.
when i press it , how can i know which is fired first?
or is there a way to make one of them get fired before
the other one?
in fact i made a experiment about it :
i put message boxes in the events, when i press button
only one event isfired and other is never. why does that happens?
.