public static Size GetPartSize(
string className,
IntPtr hwnd,
IDeviceContext dc,
int part,
int state,
bool actualSize
)Public Shared Function GetPartSize (
className As String,
hwnd As IntPtr,
dc As IDeviceContext,
part As Integer,
state As Integer,
actualSize As Boolean
) As Sizepublic:
static Size GetPartSize(
String^ className,
IntPtr hwnd,
IDeviceContext^ dc,
int part,
int state,
bool actualSize
)static member GetPartSize :
className : string *
hwnd : IntPtr *
dc : IDeviceContext *
part : int *
state : int *
actualSize : bool -> Size If hwnd is not IntPtr.Zero, the result can consider the scaling of a particular control when the application has per-monitor DPI awareness.
For className, part and state you can use the predefined nested classes of the VisualStyleElement class. For more information see also the Parts and States page.