Boblysan

Boblysan

  • NA
  • 66
  • 0

Please help me with this one!!!

Dec 1 2003 2:49 AM
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

Answers (4)