This is the testing code with the creation of the object (it happens at Form Activate Event) :
'CALENDAR TEST
Calendar1.TimetableSettings.Dates.Clear()
For i As Int16 = 0 To 5
Calendar1.TimetableSettings.Dates.Add(DateTime.Today + New TimeSpan(i, 0, 0, 0))
Next
Calendar1.TimetableSettings.VisibleColumns = 3
Calendar1.EndInit()
Calendar1.TimetableSettings.CellSize = Calendar1.TimetableSettings.CellSize * (Me.Height / 320) * 2
Calendar1.TimetableSettings.TimelineSize = Calendar1.TimetableSettings.TimelineSize * (Me.Height / 320)
Calendar1.BeginInit()
Dim s As New MindFusion.Scheduling.Appointment
s.Id = "210921"
s.HeaderText = "Bill Gates"
s.DescriptionText = "Meeting with Bill"
s.StartTime = New DateTime(2007, 9, 17, 13, 30, 0)
s.EndTime = New DateTime(2007, 9, 17, 16, 30, 0)
Calendar1.Schedule.Items.Add(s)
s = New MindFusion.Scheduling.Appointment
s.Id = "29823"
s.HeaderText = "Secretary"
s.DescriptionText = "Meeting with my Secretary"
s.StartTime = New DateTime(2007, 9, 17, 16, 0, 0)
s.EndTime = New DateTime(2007, 9, 17, 18, 30, 0)
s.Style.FillColor = Color.Gold
Calendar1.Schedule.Items.Add(s)
Also i noticed that even when a do anything in the handler routine (ItemClicked), not only msgbox (e.g. when i try to raise a form dialog), when the sub finished i get the same exception. Only when the handler sub is empty, it works properly...
|