Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the background color of the MainMenu or of a ToolBar

Status
Not open for further replies.

mondi

Programmer
Sep 10, 2003
169
AL
Hello everybody. I am trying to change the colors of the MainMenu and of a toolbar but I didn't find any way how to do it. It always takes the default color for the toobar, which is the Control Color. I have created to components MainMenuPr and ToolBarPr that inherit respectively from the MainMenu and ToolBar of the System.Windows.Forms
Any help would be very appreciated!

Country of eagles
 
mmm...

Maybe you can create a new User Control that inherits from System.Windows.Forms.MainMenu then override the OnPaint or OnPaintBackground event and handle the colours from there.

Regards... [smile]
 
I've tried that before - and it doesn't really work.

You're better off creating your own menu control. This is a good chunk of work though.

The other option is to look into the controls used in MS Office as they can be accessed by C#. You'll need to look it up on
 
Thank you guys. I found an example at . I will have a look on it and see if I can find something helpful in that. But I am going to have a look at microsoft's web site like JurkMoney said. It seems really a very attractive idea to be able to use the controls used by MS Office
Cheers

Country of eagles
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top