How do I select an appointment on a right-click?


Currently, the control is designed to only select an appointment on the left click action.  However, by combining the AppointmentAt method and the MouseDown event, this functionality can achieved.

Example:

Private Sub ctDays1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim nIndex As Integer
If Button = 2 Then
nIndex = Me.ctDays1.AppointmentAt(x / Screen.TwipsPerPixelX, y / Screen.TwipsPerPixelY)
Me.ctDays1.AppointSelect = nIndex
End If
End Sub