Theming

N

nicolasr

Hi,

I try to find out whether there is a reliable way to detect
if an application is themed. Especially I need to know that
from within my user control.

From all the newsgroup posts I read I could only infer two
things:
I could PInvoke the API functions IsAppThemed() and IsThemeActive().
IsAppThemed() indicates whether theming is enabled system
wide. IsThemeActive() tells whether theming is disabled for
a particular application via the program compatibility dialog.

These functions do, however, not tell me whether there is a
manifest! Since the manifest could be embedded in the
applications resources it's not enough to simply check for
the existence of a manifest file.

Another post suggested checking the version of comctl32.dll
that is used by the system for a particular application. Version 6
then would tell me the app uses themes. How can I check for
the comctl32.dll version in my C# control?

thanks for any ideas!

Nick
 
N

nicolasr

Another post suggested checking the version of comctl32.dll
that is used by the system for a particular application. Version 6
then would tell me the app uses themes. How can I check for
the comctl32.dll version in my C# control?

I now tried this with GetCurrentProcess().Modules and looked
for ComCtl32.dll to check its version with ProcessModule.FileVersionInfo.
The strange result is that whether the app is themed or not it
always has both versions mapped!! I tried the same with a non-dotnet
application and it has always either version 5 or version 6 mapped
depending on whether there exists a manifest.

Any ideays?

Nick
 

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