toolbar background color.....

bzeus

Member
Joined
Feb 22, 2005
Messages
14
Programming Experience
Beginner
I wanted to know how do you change the background color of a toolbar...i checked the properties for it and couldn't find it....if there's a code to do this please give me an example....i searched the net but couldn't find anything....thanks in advance.....:)
 
Yes the toolbar is not a very customizable control.
To change the background color, you would have to either subclass the toolbar and do the drawing yourself or create a new toolbar control from scratch.
 
Create your own custom toolbar. Much easier than you think...
 
Well, for a newbie the easiest way would be to "cheat". Take a panel, slap a few buttons on, fiddle a little with the buttons' and panel's attributes...

If your looking for something fancy you should firstly familiarize yourself with OO programming and control creation in VS.Net.
 
Hows going bull??

Seeing as its now almost 8 months since you posted your question I am guessing you already answered your Q somehow...

How to change the background color of a toolbar:
1.Place a panel on your form
2.Set the panel's docked property to Top (the default for a toolbar)
3.Set the panels backcolor to the color that you want the toolbar to be
4.Place a toolbar on the panel mentioned above

The Toolbar & its buttons inherit their backcolor from their parent control. Seems simple enough.

You could always 'subclass the toolbar and do the drawing yourself' but for a newbie to VB simple is best.

Keep Learning
 
Hey sorry, maybe i was drunk when i wrote that. :D :p

A white toolbar
tbwhite.gif

the only thing is that you have to set the .appearance property to flat. Then it inherits .backcolor from it's parent control.

If you want a toolbar that actually has buttons on it then... you are in for about 20 times as much work.

All graphic design programs make 3d looking images & I prefer the look of a flat toolbar.

I am sure that www.MSDN.com will have some articles on how to change the backcolor with code
 
Back
Top