MonthCalendar - Bolded Dates - Changing Colors
Hi, all,
I have added some dates to a database (SQL Server) and I have loaded those dates into my Month Calendar and have been able to bold the dates. The bolding of the dates is in black, of course. Is there a way to be able to change the bolded dates color or at least even the background of those bolded dates? I have not found anywhere on MSDN that shows this as a possibility.
This is what I have:
Code:
Try
With RescissionCalendar
Dim TheDatesToAdd = GetRescissionDates()
For Each TheDate As String In TheDatesToAdd
.AddBoldedDate(TheDate)
Next TheDate
.UpdateBoldedDates()
End With
Catch CastEx As InvalidCastException
MessageBox.Show(CastEx.Message, _
"Invalid Cast Exception", _
MessageBoxButtons.OK, _
MessageBoxIcon.Error, _
MessageBoxDefaultButton.Button1)
End Try
Public Function GetRescissionDates() As List(Of Date)
Dim SQL As String = "SELECT * FROM RescissionHolidayDates"
Dim Output As New List(Of Date)()
Using cn As SqlConnection = New SqlConnection(ConnectToDatabase)
Using cmd = New SqlCommand(SQL, cn)
cn.Open()
Try
Dim dr = cmd.ExecuteReader()
While dr.Read()
Output.Add(dr("TheDate"))
End While
Catch e As SqlException
MessageBox.Show("There was an error accessing your data. DETAIL: " & e.ToString())
Finally
cn.Close()
End Try
End Using
End Using
Return Output
End Function