so say if you have the below
this.button1.Click += new System.EventHandler(this.button1_Click);
private void button1_Click(object sender, EventArgs e)
{
// Some code executing..
}
and your toolbar button is called tb1
all you do is the below
this.tb1.Click += new System.EventHandler(this.button1_Click);
Also in VS, you can select a control like your toolbar button, see its
properties and switch to event view ( click the icon in property titlebar).
Now select click, and then click drop down arrow and select the appropriate
method.
HTH
VJ
"Chris" <Ch***@discussions.microsoft.comwrote in message
news:51**********************************@microsof t.com...
How do I get a toolbar button to execute the code of another buttons click
method?
I am embarrased to ask but I cannot get it to work.
thanks
CM