tags:

views:

82

answers:

2

Many applications have dialogs which have totally custom-looking dialogs, big fat tool-bars and non-rectangular shapes. Notepad++ looks fairly standard, but is able to make dialogs transparent (e.g the search/replace dialog).

While WPF allows such things (I think) apps have been doing this way before WPF/Aero/Vista existed. Do thye all rely on totally customising the painting/rendering functionality or do they do something else? I've not seen much in MFC or Winforms for this as standard.

A: 

For transparency:

Here's a CodeProject link for doing it with the Win32 API:

http://www.codeproject.com/KB/winsdk/quaker1.aspx

And to do it in .Net you just set the Form's Opacity property to something less than 100%, like 50 to have it be half way transparent.

For non-rectangular windows:

Here's some info that may help:

http://www.devx.com/dotnet/Article/21448

http://www.catch22.net/tuts/tips#NonRectangularWindows

Jacob Ewald
A: 

To do transparency, use the form's opacity property, as Jacob Ewald points out.

To do shaped forms, check out this MSDN article.

Cam Soper