Form title bar

  • Thread starter Thread starter Ayan
  • Start date Start date
A

Ayan

Hi,

In an application I need to develop a transparent window's form with
opaque title bar. The transparency of the form can be achieved easily
with TransparencyKey attribute but in this case the title bar, which is
also a part of the form, becomes transparent too. Can anyone please give
me a solution? I am using C# in my application.

Warm regards,
Ayan
 
You can use two methods.

First use the LayeredWindow API and per-pixel alpha to control the
transparency of the whole window including the non-client area. This is an
advanced method and requires a long article to describe so I don't have any
code immediately available.

Secondly, you can use window regions to define the areas that you wish to
see or have hidden.

--
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.
 
Back
Top