Desktop Functions: Smart Device Functions:
|
GetCurrentThemeName (uxtheme)
Get the name of the current theme in-use. Optionally, return the ColorScheme name and the Size name of the theme. C# Signature:
[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)] VB .NET Signature:
Declare Unicode Function GetCurrentThemeName Lib "uxtheme" (ByVal stringThemeName As StringBuilder, ByVal lengthThemeName As Integer, ByVal stringColorName As StringBuilder, ByVal lengthColorName As Integer, ByVal stringSizeName As StringBuilder, ByVal lengthSizeName As Integer) As Int32 User-Defined Types:None. Notes:Originally the signature had the 3 StringBuilder parameters as out params, but that did not work. Once that was removed it worked. Tips & Tricks:When creating the StringBuilder variable, an initial size must be set otherwise an unmanaged exception is thrown Sample Code:
StringBuilder stringThemeName = new StringBuilder(260);
// if only one information is needed (e.g. the theme filename): Alternative Managed API:TODO Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|