开发者

Is there a standard (non-WPF) way to do unusual shape/style dialogs?

开发者 https://www.devze.com 2022-12-10 20:18 出处:网络
Many applications have dialogs which have totally custom-looking dialogs, big fat tool-bars and n开发者_如何学Con-rectangular shapes.

Many applications have dialogs which have totally custom-looking dialogs, big fat tool-bars and n开发者_如何学Con-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.


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


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

To do shaped forms, check out this MSDN article.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号