Note
To render freely scalable visual elements such as push buttons, use always the Render method instead.
This method is to scale visual elements of a fix size, such as a checkbox or radio button.
public static void RenderScaled(
string className,
IntPtr hwnd,
Graphics graphics,
int part,
int state,
Rectangle bounds
)Public Shared Sub RenderScaled (
className As String,
hwnd As IntPtr,
graphics As Graphics,
part As Integer,
state As Integer,
bounds As Rectangle
)public:
static void RenderScaled(
String^ className,
IntPtr hwnd,
Graphics^ graphics,
int part,
int state,
Rectangle bounds
)static member RenderScaled :
className : string *
hwnd : IntPtr *
graphics : Graphics *
part : int *
state : int *
bounds : Rectangle -> unit If hwnd is not IntPtr.Zero, the rendering can consider instance-specific visual style details, such as dark style or 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.