Version

DrawControl(Control,Graphics,Rectangle,Rectangle,ImageAttributes) Method

Draws a control (and all of its descendant controls).
Syntax
'Declaration
 
Protected Overloads Sub DrawControl( _
   ByVal controlToDraw As Control, _
   ByVal graphics As Graphics, _
   ByVal rect As Rectangle, _
   ByVal clipRect As Rectangle, _
   ByVal attributes As ImageAttributes _
) 
protected void DrawControl( 
   Control controlToDraw,
   Graphics graphics,
   Rectangle rect,
   Rectangle clipRect,
   ImageAttributes attributes
)

Parameters

controlToDraw
The control to draw.
graphics
The graphics object to draw the control on.
rect
The destination rectangle.
clipRect
The clipping area.
attributes
The image attributes to use.
Remarks
If the attributes parameter is not null then an off-screen bitmap will be created regardless of the doubleBuffer parameter value.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also