[Help] Transparent MenuStrip?[Solved]

Posts 1–5 of 5 · Page 1 of 1
[Help] Transparent MenuStrip?[Solved]
I need to add a MenuStrip to my form that has a transparent background so it shows the PictureBox that's behind it (not the form's colour).

I've tried using the following code but the MenuStrip 'disappears' for no reason:
Code:
        MenuStrip1.Parent = PictureBox1
        MenuStrip1.BackColor = Color.Transparent
        MenuStrip1.BringToFront()
        MenuStrip1.ForeColor = Color.White
        MenuStrip1.AutoSize = True
WinForms only supports single-level transparency.

If you use GDI+, that becomes a different story
Quote Originally Posted by master131 View Post
Well I have no idea how to use GDI+ functions even after reading this:
Bob Powell's GDI+ FAQ

/
That's because it is a welcome screen :L

Putting that aside, GDI+ is really slow - it impacts massively on performance. So it's a no go. What you COULD do is make an algorithm that uses your form's current background, creates an image from it with whatever desired image you want (with transparency) and then use that as the MenuStrip's background.

If you don't understnad me, sorry, I was in jibberish mode. Will be back on English mode soon.

Welcome to the GDI+ FAQ.

GDI+ is the graphics system most often associated with Windows Forms and is a more modern replacement for GDI. This frequently asked questions list contains articles and code that will help you to understand the ins and outs of GDI+.

To get the best out of the GDI+ FAQ and to ensure that you see new articles as they are published, you are invited to subscribe to the RSS feed that carries news, announcements and information about this resource. The button below has the subscription URL.



Because the GDI+ FAQ is your resource, you can send requests to Bob Powell for new articles and tips. While many of the requests are answered personally the volume of requests is such that it is impossible to answer them all. The best way to see if your question was answered is to subscribe to the RSS feed and watch for new articles.

Click here to enter the GDI+ FAQ.
Quote Originally Posted by freedompeace View Post
What you COULD do is make an algorithm that uses your form's current background, creates an image from it with whatever desired image you want (with transparency) and then use that as the MenuStrip's background.
Solved, I got it now!
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us