-
Hello!
I'd like to create a toolbar in my app, for the most common choices, such as New file, Save file, Open file, Print, Cut, Copy, Paste and so on (I'm working on a texteditor/encryptor).
I guess I could put in a lot of small pictures, but there should be an easier way o do it.
If anyone know how to create it, please help me!
Thanks,
Pentax
-
Hi,
what you need to do is:
1) add the Component Windows Common Controls to you project, it contains a toolbar
2) drag a toolbar and an imagelist to your form
3) add icons to the imagelist
4) in the Button-Tab of the Toolbar, set the buttons you want to have, give each button a key
5) add the code
Code:
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "Key1" 'key for button1
'add code you want to run
Case "Key2"
'...
End Select
End Sub
Hope this helps
-
Thankyou
Thanks a lot!
I'll try it (when I've got time over from History, French, Math, Physics, German, Chemistry and other stuff).
*Sigh*
Pentax