BUG: GetDayBold Event Not Working as Expected with MonthView Control (229063)



The information in this article applies to:

  • Microsoft Visual Basic Learning Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0

This article was previously published under Q229063

SYMPTOMS

When using the GetDayBold event with the MonthView control, the wrong days are shown in bold format.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Created a new Standard EXE project in Microsoft Visual Basic. Form1 is created by default.
  2. From the Project menu, select Components, select Microsoft Windows Common Controls-2 6.0, and click OK.
  3. Site a MonthView control onto Form1.
  4. Add the following code to Form1's code window:
    Private Sub MonthView1_GetDayBold(ByVal StartDate As Date, ByVal Count As Integer, State() As Boolean)
         Dim i As Integer
    
         i = mvwSunday
         While i < Count
             State(i - 1) = True
             i = i + 7
         Wend
    End Sub
    					
  5. Right-click on MonthView Control and view its properties.
  6. Set the MonthRows property to 3.
  7. Set the MonthColumns property to 4.
  8. Click OK to close the MonthView's property page.
  9. Press the F5 key to run the project.

    The first month shown will not have its first Sunday in bold. The last month will not have any days set bold. All other months will be displayed as expected.

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbBug kbCtrl kbMonthCalCtrl kbpending KB229063