Microsoft KB Archive/229063

= BUG: GetDayBold Event Not Working as Expected with MonthView Control =

Article ID: 229063

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



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.



Steps to Reproduce Behavior
 Created a new Standard EXE project in Microsoft Visual Basic. Form1 is created by default. From the Project menu, select Components, select Microsoft Windows Common Controls-2 6.0, and click OK. Site a MonthView control onto Form1.  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  Right-click on MonthView Control and view its properties. Set the MonthRows property to 3.</li> Set the MonthColumns property to 4.</li> Click OK to close the MonthView's property page.</li> 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.</li></ol>

Keywords: kbbug kbmonthcalctrl kbctrl kbpending KB229063

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.