ToolBar1

i created: ToolBar1, how do i tell which button the user clicked?
no matter which button i click on it creates the same Toolbar1 sub.
what is the secret?
[166 byte] By [rockinron] at [2007-11-18 19:15:16]
# 1 Re: ToolBar1
Along these lines...

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

Select Case Button.Key

Case "Cut"

Case "Paste"

End Select

End Sub
Dmorley at 2007-11-9 23:12:22 >
# 2 Re: ToolBar1
thanks for the info! i found out that "button" contains the text of the button clicked.

what formats of pictures can be put into a toolbar button?

most everything i try is "invalid format" and even if it does accept the picture, it still does not show the picture in the toolbar button.

icons show invalid format, what gives?

where can i get graphics to put into my toolbar buttons?

any ideas?
rockinron at 2007-11-9 23:13:28 >
# 3 Re: ToolBar1
You need to add an image list to the form with the toolbar.

Add your images to the image list, icons etc all fine.

Then, map your toolbar buttons to the image list...

1) Set the 'ImageList' property of the toolbar to the image list you just added to your form.

2) Under the 'Buttons' section, set the 'Image' property to the index or key of the image in your image list.

The toolbar will then display the images
Dmorley at 2007-11-9 23:14:28 >
# 4 Re: ToolBar1
Oh and btw.
Just to add this here

You can also dynamically load the images to the image list from the source code.

Through

Imagelist.Images.Add etc..
So you could (if needed) load icon skins in your application..

Sorry if the syntax isn't 100% right.. but I haven't got my VB installed right now and it's been some time since I programmed toolbars and imagelists in vb

greetings Illuvatan
Illuvatan at 2007-11-9 23:15:24 >
# 5 Re: ToolBar1
thanks for the code. i will print it out and give it a try after i have finished the bulk of the coding.
------------------------
different subject:
have you ever heard of: VAX

it is used usually by governmental agencies to send an ASCII file over a modem to a computer for the purpose of billing. it has a password & username similar to FTP.

i am desperate to find information on this subject.
rockinron at 2007-11-9 23:16:25 >