VisualStyleRenderer.HitTestBackground Method (Graphics, Rectangle, Region, Point, HitTestOptions)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns a hit test code indicating whether the point is contained in the background of the current visual style element and within the specified bounds.

Namespace:   System.Windows.Forms.VisualStyles
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public HitTestCode HitTestBackground(
	Graphics g,
	Rectangle backgroundRectangle,
	Region region,
	Point pt,
	HitTestOptions options
)

Parameters

g
Type: System.Drawing.Graphics

The Graphics this operation will use.

backgroundRectangle
Type: System.Drawing.Rectangle

A Rectangle that contains the background of the current visual style element.

region
Type: System.Drawing.Region

A Region that specifies the bounds of the hit test area within the background.

pt
Type: System.Drawing.Point

The Point to test.

options
Type: System.Windows.Forms.VisualStyles.HitTestOptions

A bitwise combination of the HitTestOptions values.

Return Value

Type: System.Windows.Forms.VisualStyles.HitTestCode

A HitTestCode that describes where pt is located in the background of the current visual style element, if at all.

Exception Condition
ArgumentNullException

g is null.

.NET Framework
Available since 2.0
Return to top
Show: