In Vc++, by using same names I can make use of the same function for a Menu and Toolbar . How do I do it in VB ?
Anand
Printable View
In Vc++, by using same names I can make use of the same function for a Menu and Toolbar . How do I do it in VB ?
Anand
There is no such facility in VB. What you have to do is create the Event procedures for the menu items you want. Create the same thing for Toolbar buttons also. In toolbar procedure you call the event procedures of Menu.
For example.
Public Sub ToolBar1_Click(....,....)
select case Button.Caption
............
case "New": call mnuFile_New_Click
..............
.........
..........
End Sub