guicho
asked on
Toolbar in MDI Form
How can I execute a procedure from a child form clicking an icon in the toolbar into MDI Form???
ASKER
The answer is correct, but I've 9 icons in the toolbar, how assign the procedure to the third icon???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The first answer was excellent, but in the second I can't select only the third icon click event, I resolved this way from MDIForm...
Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
If Toolbar1.Buttons(3).Value = tbrUnpressed Then Child1.MyFunction
End Sub
But thank's a lot for your help...
Private Sub Toolbar1_ButtonClick(ByVal
If Toolbar1.Buttons(3).Value = tbrUnpressed Then Child1.MyFunction
End Sub
But thank's a lot for your help...
MyFunction should be declared as public...
Public Sub MyFunction()
'...
End Sub
then in the button, you can call:
Child1.MyFunction
Make sense?
Cheers!