Windows XP Look & Feel with manifest
Windows XP has a new Common Controls library comctl32.dll version 6, which implements XP's look & feel.
comctl32.dll version 6 is a side by side assembly deployed to %windir%\WinSxs (the equavalent of GAC in Fusion/Win32).
For compatibility reason, by default your application will use the comctl32.dll version 5 in %windir%\system32, unless you specify that you want comctl32.dll version 6 using a manifest file.
Here is an example of the manifest file:
c:\more fuslogvw.exe.manifest
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="Microsoft.FUSLOGVW" type="win32" />
<description>Microsoft .Net Framework Assembly Binding Log Viewer</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>
</assembly>
It is crucial that you say 'processorArchitecture="*" ' in the manifest file. If you mention ''processorArchitecture="x86"', your application will not be able to launch in 64 bit Windows.
Comments
- Anonymous
November 02, 2004
Great for 1.0, however in 1.1, all you have to do is call Application.EnableVisualStyles() prior to launching your form. In fact, an even better method, is to use a 3rd party assembly from Skybound (www.skybound.ca) ... its the "VisualStyles" free assembly. - Anonymous
November 02, 2004
The manifest works for everything, not just for managed applications.
The example I shown is on fuslogvw.exe, which is an unmanaged application. - Anonymous
November 02, 2004
I'll give this a try - the standard visual styles support leaves a LOT of bugs behind, simple ones too - like clicking on the scrollbars of a combobox.
Hopefully it'll work better using version 6 of comctl32... - Anonymous
November 03, 2004
If you put "processorArchitecture="x86"" will the application fail compeltely on 64bit Windows, or will it just run in 32bit mode? - Anonymous
November 03, 2004
If the application is a native 64 bit application, it will completely fail. If it is a 32 bit application, then it will run in 32 bit mode. Manifest does not decide which mode the application runs. The PE does. - Anonymous
November 18, 2004
If you happen to be writing a VB6 app it is possible by also calling InitCommonControls, but not supported.
See:
http://support.microsoft.com/?id=309366