XP Themes

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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?
 
Back
Top