How do I draw an Image on the menubar?

speedstickoo used Ask the Experts™

  I am working on an app where I need to have an image on the topright corner. The problem is there's a menubar and the image needs to start from right under the window's title bar.

When I try to do this with a PictureBox, Vb won't let me drag it any higher and if I set top to a negative number it just cuts off my image.

I know this is possible, I've seen in done in a MFC program.

How can I do this is VB?

I have made a request to Community Support to close this question since I answered it myself. They will do so 72 hours if there are no objections.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Have no clue, but you may want to try

or something like that in formload.


I tried that before. All it does is cut off the picture.

Is there some APIs I could use?? Or is there something I could do with the menubar?

You can use 'SetMenuItemBitmaps'  Win32 API function and some others to manage look of your menus.

Best regards,
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


I think I solved my own question. What I needed to do was get a Window HDC (this type of display context includes the nonclient area). To get this type of HDC, I used GetDCEx with a a DCX_Flag of DCX_WINDOW.

And once I have that I could draw anywhere on the window that I want!


How can I close my own question????
As requested in CS PAQ'd and points refunded.


Community Support Moderator
Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial