Hi,

I have a naive question. I dropped the VFP Calendar ActiveX control onto my
form but can't figure out how to get the date data once the user selects or
changes the date graphically. Can someone help me with this?

Thanks

Zoom

Re: How to use VFP Calendar Active X control? by Man-wai

Man-wai
Thu Apr 12 08:44:26 CDT 2007

Zoom wrote:
> Hi,
>
> I have a naive question. I dropped the VFP Calendar ActiveX control onto my
> form but can't figure out how to get the date data once the user selects or
> changes the date graphically. Can someone help me with this?

it should have a .value property...
and in case you wanna write your own:

http://fox.wikis.com/wc.dll?Wiki~CalendarControl~VFP

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10) Linux 2.6.20.6
^ ^ 21:42:01 up 5 days 4:33 0 users load average: 1.05 1.05 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: How to use VFP Calendar Active X control? by Anders

Anders
Thu Apr 12 09:26:55 CDT 2007

Are you talking about ACTIVATE WINDOW Calendar? The chosen date is in the
system variable _DIARYDATE.
But that's not an ActiveX by any means.
-Anders

"Man-wai Chang" <toylet.toylet@gmail.com> wrote in message
news:%23tilYiQfHHA.3508@TK2MSFTNGP03.phx.gbl...
> Zoom wrote:
>> Hi,
>>
>> I have a naive question. I dropped the VFP Calendar ActiveX control onto
>> my
>> form but can't figure out how to get the date data once the user selects
>> or
>> changes the date graphically. Can someone help me with this?
>
> it should have a .value property...
> and in case you wanna write your own:
>
> http://fox.wikis.com/wc.dll?Wiki~CalendarControl~VFP
>
> --
> .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
> / v \ Simplicity is Beauty! May the Force and Farce be with you!
> /( _ )\ (Ubuntu 6.10) Linux 2.6.20.6
> ^ ^ 21:42:01 up 5 days 4:33 0 users load average: 1.05 1.05 1.01
> news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk




Re: How to use VFP Calendar Active X control? by SandorHajdu

SandorHajdu
Fri Apr 13 03:10:01 CDT 2007

I ran the program and I had a problem with April,July and December.
I could not see the last day of these months.
Where did I make a mistake?
--
Sandor


"Man-wai Chang" wrote:

> Zoom wrote:
> > Hi,
> >
> > I have a naive question. I dropped the VFP Calendar ActiveX control onto my
> > form but can't figure out how to get the date data once the user selects or
> > changes the date graphically. Can someone help me with this?
>
> it should have a .value property...
> and in case you wanna write your own:
>
> http://fox.wikis.com/wc.dll?Wiki~CalendarControl~VFP
>
> --
> .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
> / v \ Simplicity is Beauty! May the Force and Farce be with you!
> /( _ )\ (Ubuntu 6.10) Linux 2.6.20.6
> ^ ^ 21:42:01 up 5 days 4:33 0 users load average: 1.05 1.05 1.01
> news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
>

RE: How to use VFP Calendar Active X control? by Allan

Allan
Sat Apr 14 00:04:01 CDT 2007

Hi,

Create a new control with a BaseClass 'control' and drop the ActiveX
Calendar onto it and name it 'oleDate'. Then create two methods for the
control: SetValue and GetValue; with the following codes:

*-- SetValue code
LPARAMETER tdDate
LOCAL nMon, nDay, nYear

IF TYPE("tdDate") <> "D" OR PCOUNT() < 1
tdDate = DATE()
ENDIF

nMon = MONTH(tdDate)
nDay = DAY(tdDate)
nYear = YEAR(tdDate)

This.oleDate.Day = nDay
This.oleDate.Month = nMon
This.oleDate.Year = nYear

*-- GetValue code
LOCAL lcDate

lcDate = STR(This.oleDate.Month,2) + "/" +;
STR(This.oleDate.Day,2) + "/" +;
STR(This.oleDate.Year,4)

RETURN CTOD(lcDate)

*-- Usage:
*---Drop the 'control' with ActiveX Calendar onto a form.

*-- To set its initial value:
ldTrDate = DATE()
ThisForm.ctrlDate.SetValue(ldTrDate)

*-- To get its current value:
ldTrDate = ThisForm.ctrlDate.GetValue()

Hope this helps...

Allan

"Zoom" wrote:

> Hi,
>
> I have a naive question. I dropped the VFP Calendar ActiveX control onto my
> form but can't figure out how to get the date data once the user selects or
> changes the date graphically. Can someone help me with this?
>
> Thanks
>
> Zoom
>
>
>

Re: How to use VFP Calendar Active X control? by Fred

Fred
Sat Apr 14 14:13:26 CDT 2007

No need to do that, you can do thisform.oleControl1.Object.Value will return
the calendar's date as a datetime value (12:00:00 AM).

--
Fred
Microsoft Visual FoxPro MVP


"Allan" <Allan@discussions.microsoft.com> wrote in message
news:BEF0ED8C-022A-4856-826D-A20304752921@microsoft.com...
> Hi,
>
> Create a new control with a BaseClass 'control' and drop the ActiveX
> Calendar onto it and name it 'oleDate'. Then create two methods for the
> control: SetValue and GetValue; with the following codes:
>
> *-- SetValue code
> LPARAMETER tdDate
> LOCAL nMon, nDay, nYear
>
> IF TYPE("tdDate") <> "D" OR PCOUNT() < 1
> tdDate = DATE()
> ENDIF
>
> nMon = MONTH(tdDate)
> nDay = DAY(tdDate)
> nYear = YEAR(tdDate)
>
> This.oleDate.Day = nDay
> This.oleDate.Month = nMon
> This.oleDate.Year = nYear
>
> *-- GetValue code
> LOCAL lcDate
>
> lcDate = STR(This.oleDate.Month,2) + "/" +;
> STR(This.oleDate.Day,2) + "/" +;
> STR(This.oleDate.Year,4)
>
> RETURN CTOD(lcDate)
>
> *-- Usage:
> *---Drop the 'control' with ActiveX Calendar onto a form.
>
> *-- To set its initial value:
> ldTrDate = DATE()
> ThisForm.ctrlDate.SetValue(ldTrDate)
>
> *-- To get its current value:
> ldTrDate = ThisForm.ctrlDate.GetValue()
>
> Hope this helps...
>
> Allan
>
> "Zoom" wrote:
>
>> Hi,
>>
>> I have a naive question. I dropped the VFP Calendar ActiveX control onto
>> my
>> form but can't figure out how to get the date data once the user selects
>> or
>> changes the date graphically. Can someone help me with this?
>>
>> Thanks
>>
>> Zoom
>>
>>
>>