Redigera

Dela via


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)

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)

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)

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)

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

dc
IDeviceContext

The IDeviceContext this operation will use.

backgroundRectangle
Rectangle

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

hRgn
IntPtr

nativeint

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

pt
Point

The Point to test.

options
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

dc is null.

Applies to

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

dc
IDeviceContext

The IDeviceContext this operation will use.

backgroundRectangle
Rectangle

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

pt
Point

The Point to test.

options
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

dc is null.

Applies to

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
Public Function HitTestBackground (g As Graphics, backgroundRectangle As Rectangle, region As Region, pt As Point, options As HitTestOptions) As HitTestCode

Parameters

g
Graphics

The Graphics this operation will use.

backgroundRectangle
Rectangle

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

region
Region

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

pt
Point

The Point to test.

options
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