MonthCalendar.HitTest 方法

定义

确定位于指定位置的日历元素。Determines which element of the calendar is at a specified location.

重载

HitTest(Point)

返回一个对象,该对象带有关于月历控件的哪个部分位于由 Point 指定的位置的信息。Returns an object with information on which portion of a month calendar control is at a location specified by a Point.

HitTest(Int32, Int32)

返回 MonthCalendar.HitTestInfo,包含有关月历控件的哪个部分位于指定的 x 和 y 坐标处的信息。Returns a MonthCalendar.HitTestInfo with information on which portion of a month calendar control is at a specified x- and y-coordinate.

HitTest(Point)

返回一个对象,该对象带有关于月历控件的哪个部分位于由 Point 指定的位置的信息。Returns an object with information on which portion of a month calendar control is at a location specified by a Point.

public:
 System::Windows::Forms::MonthCalendar::HitTestInfo ^ HitTest(System::Drawing::Point point);
public System.Windows.Forms.MonthCalendar.HitTestInfo HitTest (System.Drawing.Point point);
member this.HitTest : System.Drawing.Point -> System.Windows.Forms.MonthCalendar.HitTestInfo

参数

point
Point

Point,包含要进行点击测试的点的 XY 坐标。A Point containing the X and Y coordinates of the point to be hit tested.

返回

一个 MonthCalendar.HitTestInfo,其中包含有关 MonthCalendar 上的指定点的信息。A MonthCalendar.HitTestInfo that contains information about the specified point on the MonthCalendar.

另请参阅

HitTest(Int32, Int32)

返回 MonthCalendar.HitTestInfo,包含有关月历控件的哪个部分位于指定的 x 和 y 坐标处的信息。Returns a MonthCalendar.HitTestInfo with information on which portion of a month calendar control is at a specified x- and y-coordinate.

public:
 System::Windows::Forms::MonthCalendar::HitTestInfo ^ HitTest(int x, int y);
public System.Windows.Forms.MonthCalendar.HitTestInfo HitTest (int x, int y);
member this.HitTest : int * int -> System.Windows.Forms.MonthCalendar.HitTestInfo
Public Function HitTest (x As Integer, y As Integer) As MonthCalendar.HitTestInfo

参数

x
Int32

要进行点击测试的点的 X 坐标。The X coordinate of the point to be hit tested.

y
Int32

要进行点击测试的点的 Y 坐标。The Y coordinate of the point to be hit tested.

返回

一个 MonthCalendar.HitTestInfo,其中包含有关 MonthCalendar 上的指定点的信息。A MonthCalendar.HitTestInfo that contains information about the specified point on the MonthCalendar.

另请参阅

适用于