Solved

Click Toolbar Buttons

Posted on 2004-09-15
1
175 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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

6 Experts available now in Live!

Get 1:1 Help Now