Hi everybody,
I add a toolbar control to my form using the microsoft windows common control. Now i am not able to add buttons or icons to the toolbar. Can anyone please tell me how to add the buttons to the tool bar.
Thanx.
Regards.
Samir
Printable View
Hi everybody,
I add a toolbar control to my form using the microsoft windows common control. Now i am not able to add buttons or icons to the toolbar. Can anyone please tell me how to add the buttons to the tool bar.
Thanx.
Regards.
Samir
You just dbl-click the toolbar or something to bring up it's special properties window.
To get pics on your buttons, you need to use an Image List Control, or something, I forget its name, and then you link the toolbar to that ImageList.
Hi rjlohan
Thanx for ur reply.
Regards
Samir
No worries.
:D
After you place the toolbar on your form:-
right click the toolbar and goto properties.
go to add buttons etc and use the imagelist 1 to assign icons etc.
Place an imagelist1 on your form and goto the properties and then add icons to the imagelist1 etc.
After you have place icons in your imagelist you goback to toolbar properties and reference the button to the icon you nrequire on that button.
HOPE THIS HELPS AND IS CLEAR ENOUGH
Thank u very much buddy.
No problem.
Hope i dident waffle too much
I forgot to mention.
Once you have placed the buttons on the bar to use them when you run the program use some code like this.
Click on the toolbar and add some code like this:
Select case Button.index
case"1"
msgbox"You pressed the first button",vbinfomation
case"2"
msgbox"you hit number 2 button",vbcritical
end select
'Keep adding case statement for the number of buttons on your toolbar e.g I have 2 so there are 2 cases.
Ok