-
hey marty . .. i used this
Code:
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case LCase(Button.Key)
Case "Open"
mnuOpen_Click
Case "Save"
mnuSave_Click
End Select
end sub
and it still doesn't do anything what am i doing wrong?
the mnuOpen and the mnuSave work when u go to file and then click them but wjhen i put them on toolbar they do nothing when i click the toolbar icon . .. did i select Case somthign wrong? like is it suppose to be set at Select Case LCase(button.key)?
------------------
Cory Sanchez
Young Student
ICQ#: 18640149
-
Replace the Select Case LCase(Button.Key) with Select Case Button.Key. You use "Open", for example, in your Select Case statement, so just make sure that the value of the Key in the button's properties is "Open", so that it matches exactly.
------------------
Marty
-
oh i c now! thanks again!
------------------
Cory Sanchez
Young Student
ICQ#: 18640149
-
No you don't "c" now, you VB now ;)
------------------
Marty
-
Hello i am making a simple word processor but i want to make it so the user cna use the toolbar . .. i use an image list and i know how to load the images into the toolbar but i don't know how to make the toolbar respond to the click event . . . how do i make it so i can give the toolbar buttons code to do the same as the mnuFile and so on does? i hope i explained it enough.
Thanks for your time.
------------------
Cory Sanchez
Young Student
ICQ#: 18640149
-
Here's how:
Code:
Private Sub tbarButtons_ButtonClick(ByVal Button As ComctlLib.Button)
Select Case LCase(Button.Key)
Case "new"
mnuNewSystem_Click
Case "open"
mnuOpen_Click
Case "save"
mnuSave_Click
Case "print"
mnuPrint_Click
End Select
End Sub
The items like "save" and "print" are the "Key" property of the various buttons.
------------------
Marty