HitTestBackground Method (IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions)

VisualStyleRenderer.HitTestBackground Method (IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions)

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

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

public HitTestCode HitTestBackground (
	IDeviceContext dc,
	Rectangle backgroundRectangle,
	IntPtr hRgn,
	Point pt,
	HitTestOptions options
)
public HitTestCode HitTestBackground (
	IDeviceContext dc, 
	Rectangle backgroundRectangle, 
	IntPtr hRgn, 
	Point pt, 
	HitTestOptions options
)
public function HitTestBackground (
	dc : IDeviceContext, 
	backgroundRectangle : Rectangle, 
	hRgn : IntPtr, 
	pt : Point, 
	options : HitTestOptions
) : HitTestCode
Not applicable.

Parameters

dc

The IDeviceContext this operation will use.

backgroundRectangle

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

hRgn

A Windows handle to a Region that specifies the bounds of the hit test area within the background.

pt

The Point to test.

options

A bitwise combination of the HitTestOptions values.

Return Value

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

Exception typeCondition

ArgumentNullException

dc is a null reference (Nothing in Visual Basic).

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2016 Microsoft