2011-12-18 5 views

答えて

0

Calendar.DayRenderイベントを処理し、日付範囲内でセルの外観をカスタマイズできます。完全な例は、MSDNのドキュメントページにありますが、最も重要な部分である:

Sub DayRender(source As Object, e As DayRenderEventArgs) 
    ' Change the background color of the days in the month to yellow. 
    If Not e.Day.IsOtherMonth And Not e.Day.IsWeekend Then 
     e.Cell.BackColor = System.Drawing.Color.Yellow 
    End If 
End Sub 'DayRender 

あなたは自分のカスタム範囲に日を比較し、黄色から赤色に背景色を変更するIfを適応する必要があります。