Version

CreateRoundedRegion(Rectangle,Int32) Method

Returns a System.Drawing.Region from the specified rect, with rounded corners with the specified radius.
Syntax
'Declaration
 
Public Overloads Shared Function CreateRoundedRegion( _
   ByVal rect As Rectangle, _
   ByVal radius As Integer _
) As Region
public static Region CreateRoundedRegion( 
   Rectangle rect,
   int radius
)

Parameters

rect
The System.Drawing.Rectangle on which the returned System.Drawing.Region is based.
radius
The radius of the circle whose quadrants create the rounded corners.

Return Value

A System.Drawing.Region with the same dimensions as the specified rect and rounded corners. Note that the caller is responsible for disposal of the returned object.
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