RE: How to use GetDayBold event in MonthView control? by william
william
Thu Jan 29 05:11:09 CST 2004
I have done more research for this issue in both VB6 and VFP8
In VB6, the code is as follows
Private Sub MonthView1_GetDayBold(ByVal StartDate As Date, ByVal Count As Integer, State() As Boolean
Dim i As Intege
i =
Do While i <= Coun
State(i - 1) = Tru
i = i +
Loo
End Su
When the form is running, the relevant days are immediately bold
In VFP8, the code in â??GetDayBoldâ?? event of MonthView is as follows
LPARAMETERS startdate, count, stat
i=
DO while i<= count
state(i-1) = .T
i=i+
EndDo
But the event can not be automatically trigged. I need to add more code in â??Initâ?? event of Form as follows
Local array state1(30
For i=1 to 3
state1(i)= .F
EndFor
thisform.olecontrol1.getDayBold(Date(),3,@state1
thisform.Refres
But after I run the form, none of days are bold. Any ideas? TIA
----- William wrote: ----
In MonthView control, I believe to format specific days, there is only one way to do that. The way is using GetDayBold event. Here is VB code as follows
Private Sub MonthView1_GetDayBold(ByVal StartDate As Date, ByVal Count As Integer, State() As Boolean
Dim i As Intege
i = vbSunda
While i < Coun
State(i - MonthView1.StartOfWeek) = Tru
i = i +
Wen
End Su
I donâ??t know how to translate it to VFP code. The problem is â??Stateâ??. VbSunday is 1. Any ideas
TIA.