2011-12-18 3 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 적응과 노란색에서 빨간색으로 배경색을 변경해야합니다.