VisualStyleRenderer.HitTestBackground 方法

定義

判斷目前視覺化樣式項目的背景中是否包含點。

多載

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

傳回點擊測試程式碼,指出點是否包含在目前視覺化樣式項目的背景和指定的區域中。

HitTestBackground(IDeviceContext, Rectangle, Point, HitTestOptions)

傳回點擊測試程式碼,指出目前視覺化樣式項目的背景中是否包含點。

HitTestBackground(Graphics, Rectangle, Region, Point, HitTestOptions)

傳回點擊測試程式碼 (Hit-Test Code),指出點是否包含在目前視覺化樣式項目的背景和指定的界限中。

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

傳回點擊測試程式碼,指出點是否包含在目前視覺化樣式項目的背景和指定的區域中。

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

參數

dc
IDeviceContext

此作業將使用的 IDeviceContext

backgroundRectangle
Rectangle

Rectangle,包含目前視覺化樣式項目的背景。

hRgn
IntPtr

nativeint

Region 的 Windows 控制代碼,指定背景內點擊測試區域的界限。

pt
Point

要測試的 Point

options
HitTestOptions

HitTestOptions 值的位元組合。

傳回

HitTestCode,描述 pt 在目前視覺化樣式項目之背景中的位置。

例外狀況

dcnull

適用於

HitTestBackground(IDeviceContext, Rectangle, Point, HitTestOptions)

傳回點擊測試程式碼,指出目前視覺化樣式項目的背景中是否包含點。

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

參數

dc
IDeviceContext

此作業將使用的 IDeviceContext

backgroundRectangle
Rectangle

Rectangle,包含目前視覺化樣式項目的背景。

pt
Point

要測試的 Point

options
HitTestOptions

HitTestOptions 值的位元組合。

傳回

HitTestCode,描述 pt 在目前視覺化樣式項目之背景中的位置。

例外狀況

dcnull

適用於

HitTestBackground(Graphics, Rectangle, Region, Point, HitTestOptions)

傳回點擊測試程式碼 (Hit-Test Code),指出點是否包含在目前視覺化樣式項目的背景和指定的界限中。

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

參數

g
Graphics

此作業將使用的 Graphics

backgroundRectangle
Rectangle

Rectangle,包含目前視覺化樣式項目的背景。

region
Region

Region,指定背景內點擊測試 (Hit Test) 區域的界限。

pt
Point

要測試的 Point

options
HitTestOptions

HitTestOptions 值的位元組合。

傳回

HitTestCode,描述 pt 在目前視覺化樣式項目之背景中的位置 (如果有的話)。

例外狀況

gnull

適用於