Do your applications support XP themes?

Updated by Brady Stroud [SSW] 1 year ago. See history

123
No component provided for introEmbed
Image

❌ Figure: Bad example - XP themes are not used

Image

✅ Figure: Good example - XP themes are used

Implementing XP Themes

We recommend using manifest file to support XP Themes in .NET. Follow this to use the manifest file.

  1. Set the FlatStyle Property in all our controls to "System"
Image

Figure: How to set the Button's FlatStyle Property

  1. Copy XPThemes.manifest file to your bin folder By default, you can get it from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\XPThemes.manifest
  2. Rename "XpThemes.manifest" to "ApplicationName.exe.manifest"

Note: In .NET 1.1 you can use Application.EnableVisualStyles to support XP Themes. This approach is not recommended because it can cause an 'SEHException' to be thrown and some common controls could disappear.

Acknowledgements

Adam Cogan
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.

We open source.Loving SSW Rules? Star us on GitHub. Star