A mouse button is pressed.
| C# | void object_MouseDownEvent(object sender, AxSftDateLib20._ISftCalendarEvents_MouseDownEvent e); |
| VB.NET | Private Sub object_MouseDownEvent(ByVal sender As Object, ByVal e As AxSftDateLib20._ISftCalendarEvents_MouseDownEvent) Handles object.MouseDownEvent |
| C++ | void OnMouseDownobject(short Button, short Shift, OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos); |
| C | HRESULT OnMouseDownobject(short Button, short Shift, OLE_XPOS_PIXELS xPos, OLE_YPOS_PIXELS yPos); |
object
Button
Describes the mouse buttons that are pressed. A bit is set if the button is down.
| Button | Value | Description |
|---|---|---|
| constSftControlLeftButton | 1 | The left mouse button. |
| constSftControlRightButton | 2 | The right mouse button. |
| constSftControlMiddleButton | 4 | The middle mouse button. |
Shift
Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down.
| Shift | Value | Description |
|---|---|---|
| constSftControlShiftMask | 1 | The SHIFT key is down. |
| constSftControlCtrlMask | 2 | The CONTROL key is down. |
| constSftControlAltMask | 4 | The ALT key is down. |
xPos
The x coordinate of the mouse cursor in pixels, relative to the control.
yPos
The y coordinate of the mouse cursor in pixels, relative to the control.
The MouseDown event occurs when a mouse button is pressed over the control. p The HitTest method returns the part of the control at the location, for example to show a context menu for a day. An application that shows a menu or a message box calls the CancelMode method first.
Private Sub sftCalendar_KeyPressEvent(sender As Object, e As _ISftCalendarEvents_KeyPressEvent) Handles sftCalendar.KeyPressEvent
LogEvent(sender, "KeyPress", "KeyAscii=" & e.keyAscii)
End Sub
Private Sub sftCalendar_KeyUpEvent(sender As Object, e As _ISftCalendarEvents_KeyUpEvent) Handles sftCalendar.KeyUpEvent
LogEvent(sender, "KeyUp", "KeyCode=0x" & e.keyCode.ToString("X2") & " Shift=" & e.shift)
End Sub
Private Sub sftCalendar_MouseDownEvent(sender As Object, e As _ISftCalendarEvents_MouseDownEvent) Handles sftCalendar.MouseDownEvent
LogEvent(sender, "MouseDown", "Button=" & e.button & " Shift=" & e.shift & " x=" & e.xPos & " y=" & e.yPos)
End Sub
Private Sub sftCalendar_MouseUpEvent(sender As Object, e As _ISftCalendarEvents_MouseUpEvent) Handles sftCalendar.MouseUpEvent
LogEvent(sender, "MouseUp", "Button=" & e.button & " Shift=" & e.shift & " x=" & e.xPos & " y=" & e.yPos)
End Sub
See Also SftCalendar Object | Object Hierarchy | Hit Testing