1
Vote

Cannot use the ResolveAppointments Event

description

When I try to add a ResolveAppointments event handler:
 
Private Sub DayView1_ResolveAppointments(ByVal sender As System.Object, ByVal args As Calendar.ResolveAppointmentsEventArgs) Handles DayView1.ResolveAppointments
 
End Sub
 
I get this error:
 
Error 6 'Calendar.DayView.Protected Overridable Sub ResolveAppointments(args As Calendar.ResolveAppointmentsEventArgs)' is not accessible in this context because it is 'Protected'.

comments

huan086 wrote Dec 14, 2009 at 10:32 AM

The event name is OnResolveAppointments. It does not follow the C# naming convention. So change the code to

Private Sub DayView1_OnResolveAppointments(ByVal sender As System.Object, ByVal args As Calendar.ResolveAppointmentsEventArgs) Handles DayView1.OnResolveAppointments

JohnnyJ wrote Dec 14, 2009 at 6:11 PM

Thank you for taking the time to post a reply to my problem. Unfortunately you have not been 100% observant. I posted two rows of code above, and neither of those are in C#.

I guess it's my fault also for not pointing it out, but the component works perfectly well in C# when I test it there, but NOT in VB - which is where I need to use it...

/Johnny J.

huan086 wrote Dec 18, 2009 at 2:36 AM

@Johnny: Changing to Handles DayView1.OnResolveAppointments doesn't work?
Was the component declared with the "With Events" keyword?

wrote Feb 14, 2013 at 6:53 PM