|
-
Nov 20th, 1999, 01:22 AM
#1
Thread Starter
Registered User
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
-
Nov 20th, 1999, 01:30 AM
#2
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
-
Nov 20th, 1999, 01:32 AM
#3
Thread Starter
Registered User
oh i c now! thanks again!
------------------
Cory Sanchez
Young Student
ICQ#: 18640149
-
Nov 20th, 1999, 01:41 AM
#4
No you don't "c" now, you VB now 
------------------
Marty
-
Nov 20th, 1999, 12:47 PM
#5
Thread Starter
Registered User
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
-
Nov 20th, 1999, 12:59 PM
#6
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|