Share via


XP Style WinForms

If you want to use XP themed forms in your solution (in pre whidbey) then remember that XP requires a manifest file to be in the same directory with the EXE to make this work. (e.g) put the app.exe.manifest in the same folder as app.exe

There are articles on how to write application manifests one of them is
here:
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp

Heres a sample manifest file.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*" />
</dependentAssembly>
</dependency>
</assembly>

Some applications are managed apps so they launch as 64-bit on a 64-bit machine and 32-bit on a 32-bit machine. Any managed app that takes on bit-specific dependencies (both managed and unmanaged dependencies) has a risk of failing when run against 64 bit. The developer is responsible for writing the manifest file. If the manifest is authored with processorArchitecture=“*“, then it works on both 32-bit and 64-bit platforms without any change to the file.

In Whidbey, enabling the VisualStyles is done through the project template.Please visit this post for further information.

Comments