Determines the part of the field at a location.
| C# | SftDateFieldHitConstants Area = object.HitTest(int xPos, int yPos, out object Date); |
| VB.NET | Area = object.HitTest(ByVal xPos As Integer, ByVal yPos As Integer, ByRef Date As Object) As SftDateFieldHitConstants |
| C++ | enum SftDateFieldHitConstants Area = object->HitTest(long xPos, long yPos, VARIANT* Date); |
| C | HRESULT object->raw_HitTest(long xPos, long yPos, VARIANT* Date, enum SftDateFieldHitConstants* Area); |
object
xPos
The x coordinate in pixels, relative to the control's client area.
yPos
The y coordinate in pixels, relative to the control's client area.
Date
Returns Null; the parts of a date field control have no date of their own.
Area
Returns the part of the field at the location.
| Name | Value | Description |
|---|---|---|
| fieldHitSftDateNowhere | 0 | Outside the control |
| fieldHitSftDateText | 1 | Text |
| fieldHitSftDateSegment | 2 | A part of the date or time |
| fieldHitSftDateCheckBox | 3 | Check box |
| fieldHitSftDateClearButton | 4 | Clear button |
| fieldHitSftDateDropDownButton | 5 | Dropdown button |
| fieldHitSftDateUpButton | 6 | Up button |
| fieldHitSftDateDownButton | 7 | Down button |
The HitTest method returns the part of the date field control at a location, for example to show a context menu or a tooltip for a part. p The dropdown is not part of the control; points in the dropdown return fieldHitSftDateNowhere. The location of a mouse event (MouseDown) can be passed directly, as its coordinates are pixels relative to the control.
See Also SftDate Object | Object Hierarchy | Hit Testing