Please help me with this one!!!
I am trying to use the toolbar function in my application.
I have found that whenever one of the toolbar buttons is clicked, all toolbar butten events get executed.
I do realize that there is only a single click_event for all buttons on the toolbar, so what I have done is as follows...
private void tbMainApp_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
{
if (e.Button == tbbEvent1)
try
{
Event1
if (e.Button == tbbEvent2)
try
{
Event2
if (e.Button == tbbEvent3)
try
{
Event3
Given my apparent lack of knowledge, I am assuming that given each one of the buttons will be found on the toolbar, each will execute in succession.
What should I do to ensure that when a button is clicked, ONLY THAT section of code gets executed.
Any assistance you all could provide would be EXTREMELY appreciated.
Thanks,
Bob

Mahesh ChandRank #1 · 393.3K reputationPosted Dec 1, 2003, 3:36 AM EST
I_Pogi26 reputationPosted Dec 9, 2003, 9:18 AM EST
jimteeuwenRank #4,734 · 328 reputationPosted Dec 12, 2003, 8:29 AM EST
kovanRank #1,453 · 1.1K reputationPosted Dec 13, 2003, 6:47 AM EST