Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than uxtheme, prefix the name with the module name and a period.
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)]
public extern static Int32 GetCurrentThemeName(StringBuilder stringThemeName, int lengthThemeName, StringBuilder stringColorName, int lengthColorName, StringBuilder stringSizeName, int lengthSizeName);
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);
StringBuilder stringColorName = new StringBuilder(260);
StringBuilder stringSizeName = new StringBuilder(260);
Int32 s = GetCurrentThemeName(
stringThemeName, 260,
stringColorName, 260,
stringSizeName, 260);
// if only one information is needed (e.g. the theme filename):
StringBuilder sbFilename = new sbFilename(0x200);
Int32 s = GetCurrentThemeName( sbFilename, 0x200, null, 0, null, 0);
Alternative Managed API:
TODO
Click to read this page
10/2/2011 2:35:57 AM - txzhgh-89.110.151.174
Click to read this page
10/2/2011 2:35:57 AM - txzhgh-89.110.151.174
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
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).