Solved

Click Toolbar Buttons

Posted on 2004-09-15
1
178 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net How to Exit Sub - Exit Form??? 5 58
Help with error when uploading excel file 3 29
Call windows 10 virtual keyboard from windows forms app 2 36
location of a form 2 14
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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