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.
DrawThemeBackground (uxtheme)
.
C# Signature:
C# Signatures:
[DllImport("uxtheme", ExactSpelling=true)]
public extern static Int32 DrawThemeBackgroundEx(IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, ref RECT pRect, ref DTBGOPTS poptions);
VB .NET Signature:
Declare Function DrawThemeBackgroundEx Lib "uxtheme.dll" (TODO) As TODO
public extern static Int32 DrawThemeBackground(IntPtr hTheme, IntPtr hdc, int iPartId,
int iStateId, ref RECT pRect, ref RECT pClipRect);
<DllImport("uxtheme", ExactSpelling := True)> _
Public Shared Function DrawThemeBackgroundEx(hTheme As IntPtr, hdc As IntPtr, iPartId As Integer, iStateId As Integer, ByRef pRect As RECT, ByRef poptions As DTBGOPTS) As Int32
End Function
[DllImport("uxtheme", ExactSpelling=true)]
public extern static Int32 DrawThemeBackground(IntPtr hTheme, IntPtr hdc, int iPartId,
int iStateId, ref RECT pRect, IntPtr pClipRect);
VB Signatures:
Declare Function DrawThemeBackground Lib "uxtheme.dll" (TODO) As TODO
<DllImport("UxTheme.dll", CallingConvention:=CallingConvention.Cdecl)> _
Function DrawThemeBackground(ByVal hTheme As IntPtr, ByVal hdc As IntPtr, _
ByVal iPartId As Integer, ByVal iStateId As Integer, ByRef pRect As RECT, _
ByRef pClipRect As RECT) As Integer
End Function
'Draw a button in the Statusbar (check the website for the API calls)
Dim posX As Integer = Me.Width - 5 * 20
Dim g As Graphics = Graphics.FromHdc(New IntPtr(GetWindowDC(Me.Handle.ToInt32)))
'drawThemeBackground(openThemeData(Me.Handle, "Window"), g.GetHdc, 15, 1, New RECT(New Rectangle(posX, 5, 20, 20)), IntPtr.Zero)
drawThemeBackground(openThemeData(Me.Handle, "ExplorerBar"), g.GetHdc, 7, 1, New RECT(New Rectangle(posX, 6, 20, 20)), IntPtr.Zero)
The RECT structure defines the coordinates of the upper-left and lower-right corners of a rectangle.
6/3/2013 5:41:04 PM - dahminator-75.174.65.168
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).