Solved

Click Toolbar Buttons

Posted on 2004-09-15
1
176 Views
Last Modified: 2012-05-05
I have a toolbar with 5 buttons, how will I write the code for each button. Its taking the whole toolbar clicked. Instead I want to know if I click open button on the toolbar it should open another form, if I click save, it should save etc. Please let me know How i can do that
0
Comment
Question by:angireddy
1 Comment
 
LVL 27

Accepted Solution

by:
planocz earned 500 total points
ID: 12068406
sample...

   Protected Sub toolBar1_ButtonClick(ByVal sender As Object, ByVal e As ToolbarItemClickEventArgs)
        ' Evaluate the Button property to determine which button was clicked.
        Select Case ToolBar1.Buttons.IndexOf(e.Button)
            Case 0  'New Customer
                   Dim objForm As New frmNewCust
                objForm.MdiParent = Me
                objForm.Show()
            Case 1  'Edit Customer
                   Dim objForm As New frmNewCust
                objForm.MdiParent = Me
                objForm.Show()
           End Select
    End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now