XP themes for WindowsForm invoked from dll (Shell)

G

geo24

Hi,

have a windows form (form with progressbar) called from dll which is a
Shell Extension. The problem the progressbar is not XP style. The
progressbar control has flatstyle property set to System.

Tried to use manifest file for .dll but it doesn't work...

Any ideas?
 
H

Herfried K. Wagner [MVP]

geo24 said:
have a windows form (form with progressbar) called from dll which is a
Shell Extension. The problem the progressbar is not XP style. The
progressbar control has flatstyle property set to System.

Tried to use manifest file for .dll but it doesn't work...

You'll have to create an activation context to enable Windows XP visual
styles in your DLL. The archive
<URL:http://dotnet.mvps.org/dotnet/articles/sxs/SxS.zip> contains code for
creating an activation context in the "samples\ActCtx" directory.
 
G

geo24

Hi Herfried,

Thank you for your post.
would be that possible to use this trick with 1.1 framework?

Regards
 
G

Guest

create a text file called YourAppName.exe.manifest

paste this into the text file:
(remember YouAppName = you exe ass name)

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


make sure the file is present in your bin direction (where the execuatble
runs from)

HTH

geo24 said:
Hi again,

found something should do the same thing what your code:

http://support.microsoft.com/kb/830033

but it doesn't seem to work.

Regards
 
G

geo24

Hi,

have tried manifest already... it works great with exe files but it
doesn't for windows forms invoked from dlls....

create a text file called YourAppName.exe.manifest

paste this into the text file:
(remember YouAppName = you exe ass name)

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


make sure the file is present in your bin direction (where the execuatble
runs from)

HTH
 
M

Mattias Sjögren

have a windows form (form with progressbar) called from dll which is a
Shell Extension. The problem the progressbar is not XP style.

Another reason not to write shell extensions in managed code. Native
code is the way to go.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top