VisualStyleRenderer.HitTestBackground VisualStyleRenderer.HitTestBackground VisualStyleRenderer.HitTestBackground VisualStyleRenderer.HitTestBackground Method

Definition

Determines whether a point is contained in the background of the current visual style element.

Overloads

HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions) HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions) HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions) HitTestBackground(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.

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

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

HitTestBackground(Graphics, Rectangle, Region, Point, HitTestOptions) HitTestBackground(Graphics, Rectangle, Region, Point, HitTestOptions) HitTestBackground(Graphics, Rectangle, Region, 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 bounds.

HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions) HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions) HitTestBackground(IDeviceContext, Rectangle, IntPtr, Point, HitTestOptions) HitTestBackground(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.

public:
 System::Windows::Forms::VisualStyles::HitTestCode HitTestBackground(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle backgroundRectangle, IntPtr hRgn, System::Drawing::Point pt, System::Windows::Forms::VisualStyles::HitTestOptions options);
public System.Windows.Forms.VisualStyles.HitTestCode HitTestBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle backgroundRectangle, IntPtr hRgn, System.Drawing.Point pt, System.Windows.Forms.VisualStyles.HitTestOptions options);
member this.HitTestBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle * nativeint * System.Drawing.Point * System.Windows.Forms.VisualStyles.HitTestOptions -> System.Windows.Forms.VisualStyles.HitTestCode
Public Function HitTestBackground (dc As IDeviceContext, backgroundRectangle As Rectangle, hRgn As IntPtr, pt As Point, options As HitTestOptions) As HitTestCode

Parameters

backgroundRectangle
Rectangle Rectangle Rectangle Rectangle

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

hRgn
IntPtr IntPtr IntPtr IntPtr

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

pt
Point Point Point Point

The Point to test.

options
HitTestOptions HitTestOptions HitTestOptions HitTestOptions

A bitwise combination of the HitTestOptions values.

Returns

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

Exceptions

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

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

public:
 System::Windows::Forms::VisualStyles::HitTestCode HitTestBackground(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle backgroundRectangle, System::Drawing::Point pt, System::Windows::Forms::VisualStyles::HitTestOptions options);
public System.Windows.Forms.VisualStyles.HitTestCode HitTestBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle backgroundRectangle, System.Drawing.Point pt, System.Windows.Forms.VisualStyles.HitTestOptions options);
member this.HitTestBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle * System.Drawing.Point * System.Windows.Forms.VisualStyles.HitTestOptions -> System.Windows.Forms.VisualStyles.HitTestCode
Public Function HitTestBackground (dc As IDeviceContext, backgroundRectangle As Rectangle, pt As Point, options As HitTestOptions) As HitTestCode

Parameters

backgroundRectangle
Rectangle Rectangle Rectangle Rectangle

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

pt
Point Point Point Point

The Point to test.

options
HitTestOptions HitTestOptions HitTestOptions HitTestOptions

A bitwise combination of the HitTestOptions values.

Returns

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

Exceptions

HitTestBackground(Graphics, Rectangle, Region, Point, HitTestOptions) HitTestBackground(Graphics, Rectangle, Region, Point, HitTestOptions) HitTestBackground(Graphics, Rectangle, Region, 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 bounds.

public:
 System::Windows::Forms::VisualStyles::HitTestCode HitTestBackground(System::Drawing::Graphics ^ g, System::Drawing::Rectangle backgroundRectangle, System::Drawing::Region ^ region, System::Drawing::Point pt, System::Windows::Forms::VisualStyles::HitTestOptions options);
public System.Windows.Forms.VisualStyles.HitTestCode HitTestBackground (System.Drawing.Graphics g, System.Drawing.Rectangle backgroundRectangle, System.Drawing.Region region, System.Drawing.Point pt, System.Windows.Forms.VisualStyles.HitTestOptions options);
member this.HitTestBackground : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Region * System.Drawing.Point * System.Windows.Forms.VisualStyles.HitTestOptions -> System.Windows.Forms.VisualStyles.HitTestCode

Parameters

g
Graphics Graphics Graphics Graphics

The Graphics this operation will use.

backgroundRectangle
Rectangle Rectangle Rectangle Rectangle

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

region
Region Region Region Region

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

pt
Point Point Point Point

The Point to test.

options
HitTestOptions HitTestOptions HitTestOptions HitTestOptions

A bitwise combination of the HitTestOptions values.

Returns

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

Exceptions

Applies to