VisualStyleRenderer.HitTestBackground Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
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
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.
- 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)
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
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
The IDeviceContext this operation will use.
- backgroundRectangle
- Rectangle
A Rectangle that contains the background of the current visual style element.
- 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)
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
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
- backgroundRectangle
- Rectangle
A Rectangle that contains the background of the current visual style element.
- 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
g
is null
.