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 Integer
i = vbSunday
While i < Count
State(i - MonthView1.StartOfWeek) = True
i = i + 7
Wend
End Sub

I donâ??t know how to translate it to VFP code. The problem is â??Stateâ??. VbSunday is 1. Any ideas?
TIA.

Re: How to use GetDayBold event in MonthView control? by Christian

Christian
Tue Jan 27 06:27:21 CST 2004

Hello,

i'v added a new "OleControl" to a visual class library ..
then selected the MonthView Control ...

in the resulting control the GetDayBold event was automatically added ..

did you try to DEFINE this in a prg ? .. if so you could just try using ..
LPARAMETERS startdate, count, state && that it how it's defined in the
visual class ..

Regards

Christian

"William" <william@hotmail.com> schrieb im Newsbeitrag
news:63E2EB10-CBF3-45E7-9EC3-D6D49FAB6112@microsoft.com...
> 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 Integer
> i = vbSunday
> While i < Count
> State(i - MonthView1.StartOfWeek) = True
> i = i + 7
> Wend
> End Sub
>
> I don't know how to translate it to VFP code. The problem is 'State'.
VbSunday is 1. Any ideas?
> TIA.
>



Re: How to use GetDayBold event in MonthView control? by Christian

Christian
Tue Jan 27 06:37:57 CST 2004

Hello,

i'v added a new "OleControl" to a visual class library ..
then selected the MonthView Control ...

in the resulting control the GetDayBold event was automatically added ..

did you try to DEFINE this in a prg ? .. if so you could just try using ..
LPARAMETERS startdate, count, state && that it how it's defined in the
visual class ..

Regards

Christian

"William" <william@hotmail.com> schrieb im Newsbeitrag
news:63E2EB10-CBF3-45E7-9EC3-D6D49FAB6112@microsoft.com...
> 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 Integer
> i = vbSunday
> While i < Count
> State(i - MonthView1.StartOfWeek) = True
> i = i + 7
> Wend
> End Sub
>
> I don't know how to translate it to VFP code. The problem is 'State'.
VbSunday is 1. Any ideas?
> TIA.
>



Re: How to use GetDayBold event in MonthView control? by Villi

Villi
Wed Jan 28 04:36:21 CST 2004

Christian Ehlscheid wrote:

Hi chris
Hi chris

all your post appear 2 times!
all your post appear 2 times!

LOL
LOL

Vilco
Vilco



Re: How to use GetDayBold event in MonthView control? by Christian

Christian
Wed Jan 28 04:40:18 CST 2004

Hello,

not all ..
i had problems posting yesterday .. and my posts didn't show up after
serveral hours .. so i resent them .

then suddenly all posts were shown by my newsreader ..
seems i have to be more patient in the future ..

Regards

Christian

"Villi Bernaroli" <a@b.c> schrieb im Newsbeitrag
news:e89lTqY5DHA.2460@TK2MSFTNGP09.phx.gbl...
> Christian Ehlscheid wrote:
>
> Hi chris
> Hi chris
>
> all your post appear 2 times!
> all your post appear 2 times!
>
> LOL
> LOL
>
> Vilco
> Vilco
>
>



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.