I am creating the monthcalendar control at run time and I am not sure if
this makes a difference, but I wouldn't think that it should. Any help or
pointers in the right direction would be great. Thanks...
-John
Perhaps someone from MS can comment on why (and how) these events don't fire even if they appear to be present. . .
--
Jacob Grass
Microsoft .NET MVP
"John" <knowt...@hotmail.com> wrote in message news:OjNS9fNWBHA.2416@tkmsftngp05...
Any ideas would be great, thanks again
-John
"Jacob Grass (MVP)" <JGr...@AbilitiSolutions.com> wrote in message
news:u#TEOxNWBHA.992@tkmsftngp03...
Try this: (assumes a monthcalendar control called MonthCalendar1 and a textbox control called TextBox1)
Private m_NumClicks As Short = 0
Private m_FirstClick As Long
Private Sub MonthCalendar1_DateSelected( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.DateRangeEventArgs) _
Handles MonthCalendar1.DateSelected
If m_NumClicks >= 2 Then
TextBox1.Text = e.Start.Date.ToString
m_NumClicks = 0
End If
End Sub
Private Sub MonthCalendar1_MouseDown( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) _
Handles MonthCalendar1.MouseDown
If e.Button = MouseButtons.Left Then
If m_NumClicks = 0 Then
m_FirstClick = Now.Ticks
m_NumClicks += 1
ElseIf (Now.Ticks - m_FirstClick) > 2000000 Then
m_NumClicks = 0
Else
m_NumClicks += 1
End If
End If
End Sub
Let me know if you have any questions.
--
Jacob Grass
Microsoft .NET MVP
"John" <knowt...@hotmail.com> wrote in message news:OYVsJ5NWBHA.1144@tkmsftngp05...
Thanks again,
-John
--
Jacob Grass
Microsoft .NET MVP
"John" <knowt...@hotmail.com> wrote in message news:eCg5cSxWBHA.2208@tkmsftngp05...