Permalink
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (35 sloc) 1.49 KB
title ms.custom ms.date ms.prod ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Using Regions
03/30/2017
.net-framework
dotnet-winforms
article
jsharp
examples [Windows Forms], regions
regions, using
7809295b-870f-4107-a8b5-8386c298acd5
11
dotnet-bot
dotnetcontent
wpickett

Using Regions

The [!INCLUDEndptecgdiplus] xref:System.Drawing.Region class allows you to define a custom shape. The shape can be made up of lines, polygons, and curves.

Two common uses for regions are hit testing and clipping. Hit testing is determining whether the mouse was clicked in a certain region of the screen. Clipping is restricting drawing to a certain region.

In This Section

How to: Use Hit Testing with a Region
Shows how to use a xref:System.Drawing.Region to perform a hit test.

How to: Use Clipping with a Region
Explains how to set the clipping region for a xref:System.Drawing.Graphics object.

Reference

xref:System.Drawing.Region
Describes this class and contains links to all of its members.

xref:System.Drawing.Graphics
Describes this class and contains links to all of its members.