Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Forms Skins in c#

Tags:

c#

How to change windows forms skins like caption bar,max & min buttons etc. I think some Win32 Api's are available for this! If any one know share kindly!

platform: win forms (windows application) in c#. Os: Windows

like image 435
Thiru G Avatar asked Feb 26 '26 11:02

Thiru G


1 Answers

I assume you mean the ability to change the window chrome for an individual Form only.

You can of course use the operating system to change the window appearance across all windows, such as Aero, Aero Basic and so forth. Operating system styling of windows has been available since Windows XP and allows custom themes to be defined and used.

To customize an individual Form you need to write alot of code yourself. There are two levels to this. For windows that are not using the Vista/Windows 7 Aero appearance then you simply need to respond to the appropriate windows messages. These include WM_NCPAINT, WM_NCHITTEST, WM_NCACTIVATE and others. When the operating system is using Aero (glassly windows) then you need to work with something called the Desktop Windows Manager (DWM).

like image 122
Phil Wright Avatar answered Mar 01 '26 01:03

Phil Wright