I have a simple code with a month calendar.

vb Code:
  1. Dim CurrentStart As Date
  2.     Dim CurrentEnd As Date
  3.     Dim TransactDates As List(Of Date)
  4.     Protected Sub LoadMonth()
  5.         TransactDates = New List(Of Date)
  6.  
  7.         for i=1 to 10
  8.             TransactDates.Add(DateAdd(DateInterval.Day, i, TransactionMonthCalendar.SelectionRange.Start))
  9.         Next
  10.  
  11.         TransactionMonthCalendar.BoldedDates = TransactDates.ToArray
  12.     End Sub
  13.  
  14.     Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  15.         If Not DesignMode Then
  16.             CurrentStart = Today.Date
  17.             CurrentEnd = Today.Date
  18.  
  19.             LoadMonth()
  20.         End If
  21.     End Sub
  22.  
  23.     Private Sub TransactionMonthCalendar_DateChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles TransactionMonthCalendar.DateChanged
  24.         If e.Start.Month <> CurrentStart.Month Or e.Start.Year <> CurrentStart.Year Then
  25.             CurrentStart = e.Start
  26.             LoadMonth()
  27.         End If
  28.  
  29.         If e.Start <> CurrentStart Or e.End <> CurrentEnd Then
  30.             CurrentStart = e.Start
  31.             CurrentEnd = e.End
  32.         End If
  33.     End Sub

The code should work like this: Every time i moved the month, it should make 10 bold days in that month.

It works fine in VS 2010 and VS2008. The problem is, after I copy (compile with debug/release) to client computers, it start made trouble. On Win 7 OS, the calendar render nothing if i press the left or right arrow, then it suddenly go to january 1753. On Win XP OS, I can't even press left or right arrow button to change month. If I press that left and right button, it will keep moving forward without stopping.

I hope anyone can have some solutions to me. I already have this bug for about a few months and still don't have any clue on how to solve it..

Thanks n regards..