MonthCalendar MouseDoubleClick


J

Jacob

For some reason, the MonthCalendar class (control) does not show the
MouseDoubleClick method (event) in the VS IDE. I added an event
handler but can't get the succker to fire the event it points to.

Any idea what I'm doing wrong? Here is the code I added...

Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
AddHandler MonthCalendar1.MouseDoubleClick, AddressOf MDC_event
End Sub

Private Sub MDC_event(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs)
' Do something
End Sub


Thanks in advance,
Jacob
 
Ad

Advertisements

K

kimiraikkonen

For some reason, the MonthCalendar class (control) does not show the
MouseDoubleClick method (event) in the VS IDE. I added an event
handler but can't get the succker to fire the event it points to.

Any idea what I'm doing wrong? Here is the code I added...

Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
AddHandler MonthCalendar1.MouseDoubleClick, AddressOf MDC_event
End Sub

Private Sub MDC_event(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs)
' Do something
End Sub

Thanks in advance,
Jacob

Same with VB 2008 Express + .NET 3.5 SP1. Though IntelliSense doesn't
offer Double Click and Click events for MonthCalendar unlike MSDN
docs, however when you define event strictly within handles clause, no
compilation error is claimed, interestingly, also the event isn't
raised at runtime on doubleclick though application is compiled
without indicating any exception:

Private Sub MonthCalendar1_DoubleClick(ByVal sender As System.Object,
_
ByVal e As System.EventArgs) Handles MonthCalendar1.DoubleClick
MsgBox("test")
End Sub

However behaviour is the same as Combobox, CheckBox and Button.
(IntelliSense doesn't offer DoubleClick but compiling is succeeded,
but event isn't raised) based on my tests.


Onur Güzel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top