XP Themes

G

Guest

The XP themes using the .NET Framework has made my application look really nice. We are designing a few controls that it would be pretty nice if we could use the same XP theme colors that are defined by the system. Is there any way in VB.NET or C# to get the colors, gradients, settings, etc. from the currently selected theme set in Windows?

Thanks
 
M

Mick Doherty

You will have to use Interop. You will find definitions for the functions
and structures in the header files 'tmschema.h' and 'uxtheme.h'. MSDN has a
fair amount of info on this.

Some of the most useful functions to search for are:
OpenThemeData
CloseThemeData
GetThemePartSize
DrawThemeEdge
DrawThemeBackground
DrawThemeParentBackground
GetThemeColor
IsAppThemed

and the message WM_THEMECHANGED

--
Mick Doherty
http://homepage.ntlworld.com/mdaudi100/index.html


virtualswp said:
The XP themes using the .NET Framework has made my application look really
nice. We are designing a few controls that it would be pretty nice if we
could use the same XP theme colors that are defined by the system. Is there
any way in VB.NET or C# to get the colors, gradients, settings, etc. from
the currently selected theme set in Windows?
 

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