Klogg Posted October 22, 2003 Posted October 22, 2003 Is there a way to change the color of the main menu bar? In my program, I give the user the option of changing the colors of the form, and it doesn't look right when the main menu bar stays gray. Quote Take a look at my programs. Go to my web site.
*Experts* Volte Posted October 22, 2003 *Experts* Posted October 22, 2003 You need to Ownerdraw the menu items and draw them manually. Look in the Code Library for my "Extend your Menus With IExtenderProvider" component. You can modify the source to suit your needs. Quote
Klogg Posted October 22, 2003 Author Posted October 22, 2003 So what do I do after dragging the Menu Icon Provider onto my form? Sorry, I'm kind of new at this. Quote Take a look at my programs. Go to my web site.
*Experts* Volte Posted October 22, 2003 *Experts* Posted October 22, 2003 That's just an example of owner-drawing menu items. As it is, when you put the component on your form, it extends every menu on the form which an ImageIndex property (you need to specify and ImageList in the MenuIconProvider component itself first), and then it will draw the image next to the menu item like it does in MS Office 2000. For what you want, you may not need the Image functionality, but you can modify the source of the component to change the background color. If I remember correctly, I commented the source code so you can find the code which does that. There's a block of code which checks if the item is selected and sets the color to either SystemColors.Control or SystemColors.Highlight, and you can change those two to whatever you want. You get full drawing control, so you can do whatever you need. Quote
Klogg Posted October 22, 2003 Author Posted October 22, 2003 Whew, I think I'm in over my head. I don't know enough about VB yet to do all of this stuff, so I think I'll just leave the menu color the way it is. Thanks for your help, though. Quote Take a look at my programs. Go to my web site.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.