Transparancy

  • Thread starter Thread starter Wayne P.
  • Start date Start date
W

Wayne P.

I have a picturebox on my form, and I need to put other controls (like a
panel) over the picture box, but I need the graphic to show through the
panel and other controls. From my searching, I believe I have learned that
this is due to a limitation / bug as controls do not allow other controls to
show through. I have heard (read) that some people have overcome this
though - how can I do this?

Vb.Net examples / sites would be preferred. I'm okay with creating my own
version of the panel control with some overrides, but I am not sure what
needs to be done for 'true' transparency.

Thanks for the input,

Wayne P.
 
Windows Forms Tips and Tricks has a section on truly transparent controls.

http://www.bobpowell.net/transcontrols.htm

--
Bob Powell [MVP]
Visual C#, System.Drawing

All you ever wanted to know about ListView custom drawing is in Well Formed.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*

The GDI+ FAQ: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://royo.is-a-geek.com/siteFeeder/GetFeed.aspx?FeedId=41

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*
 
Bob,

I'm not a C / C# guru...

When creating my own Panel control, I take it i need to include the
CreateParams, InvalidateEx, and OnPaintBackground routines?

Thanks,

Wayne P.
 
That's right. You can derive directly from Control, Panel has some baggage
that you don't need, and include those modifications I specified.

The code on the site shows an example of a simple control.

--
Bob Powell [MVP]
Visual C#, System.Drawing

All you ever wanted to know about ListView custom drawing is in Well Formed.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*

The GDI+ FAQ: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://royo.is-a-geek.com/siteFeeder/GetFeed.aspx?FeedId=41

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*
 
Back
Top