Solved

Click Toolbar Buttons

Posted on 2004-09-15
1
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.

730 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