XP Style WinForms in Word
A while back I was working on a COM Add-in for Microsoft Word with .NET. I wanted to use XP themed forms in my solution but could not figure out how to make it work. XP requiresa manifest file to be in the same directory with the EXE to make this work. (Yeah... that is totally stupid, I hear this is fixed with Whidbey).
Well since an add-in is a compiled DLL I could not figure it out. Today Iouri Simerntiski posted a solution to this problem in the VSTO newsgroups.
-----
The only way I'm aware of is to deploy a manifest that has to reside in the
same folder as winword.exe and be named winword.exe.manifest.
The new API Application.EnableVisualStyles() does not seem to work in VSTO.
There are articles on how to write application manifests one of them is
here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp
Here's my winword.manifest.exe:
<?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>
iouri