Region.FromHrgn(IntPtr) Method

Definition

Initializes a new Region from a handle to the specified existing GDI region.

public:
 static System::Drawing::Region ^ FromHrgn(IntPtr hrgn);
public static System.Drawing.Region FromHrgn (IntPtr hrgn);
static member FromHrgn : nativeint -> System.Drawing.Region
Public Shared Function FromHrgn (hrgn As IntPtr) As Region

Parameters

hrgn
IntPtr

A handle to an existing Region.

Returns

The new Region.

Remarks

This method creates a new Region with an interior defined by the existing Region referred to by the handle in the hrgn parameter.

Security

SecurityPermission
for accessing unmanaged code. Related enumeration SecurityPermissionFlag.

Applies to