Re: translucent panel...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



hi Bob-

when i try doing exactly as suggested below in my form's Load( ) event, it
indeed sets the background of the panel to blue, but its not translucent at
all. am i doing something wrong?

and are you saying that there is no way (yours or Luke's) to accomplish what
i need to do?

thanks and please advise,
ben



"Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:utfkytaWGHA.404@xxxxxxxxxxxxxxxxxxxxxxx
Try setting your form BackColor to a value created by Color.FromARGB such
as:

panel1.BackColor=Color.FromArgb(128,Color.Blue);

Unfortunately, neither my solution nor Lukes addresses the opacity of
child controls.

The Opacity system is really only available to toplevel windows because it
uses the LayeredWindow API under the covers.

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

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

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

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



"Ben Callister" <bcallister@xxxxxxxxxxxxxxxx> wrote in message
news:%23lXjm$OWGHA.2268@xxxxxxxxxxxxxxxxxxxxxxx
i need to be able to adjust the opacity of a Windows Forms 'Panel'
control. currently, this is available on Forms, but not on Panel controls.
can someone please show me a trick to make this happen with panels or any
other control that i can use without having to display another
Window/Form?

much appreciated,
ben







.



Relevant Pages

  • Re: Panel with Close button custom control
    ... Just create a user control with the button on it that you want. ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... The panel never closes, the close button click event closes the form not ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Panel with Close button custom control
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... The panel never closes, the close button click event closes the form not ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Extending A Child Controls Bounds Beyond Its Parent
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... from panel that will house all my other controls, ... What I would like to achieve is to have a very narrow but tall panel, ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: scrollable tabcontrol
    ... Put a panel in the tab page and other controls on the panel. ... Find great Windows Forms articles in Windows Forms Tips and Tricks ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Windows Forms Question
    ... a panel can be a container for a form. ... you show one or more child windows in a containing parent window. ... inherit the base controls from, say "BaseForm" and then add the required ...
    (microsoft.public.dotnet.languages.vb)