Groups | Blog | Home
all groups > dotnet general > june 2004 >

dotnet general : XP Themes


virtualswp
6/8/2004 11:03:01 PM
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?

Mick Doherty
6/9/2004 10:07:04 AM
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


[quoted text, click to view]
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?
[quoted text, click to view]


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 31/05/2004

AddThis Social Bookmark Button