dbTalk Databases Forums  

Calendar display in a VFP form

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss Calendar display in a VFP form in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cass Lewart
 
Posts: n/a

Default Calendar display in a VFP form - 09-24-2003 , 09:19 AM






How can I include a calendar as part of the VFP6 form? I know that the
calendar exists but it does not appear on the tools menu.
Cass

--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Cass Lewart Voice (732) 264-9541 Fax (630) 566-0349/_/
_/ e-mail: rlewart (AT) monmouth (DOT) com _/_/_/_/_/_/_/_/_/_/_/_/_/
_/ N 40 deg 23' 41.9", W 74 deg 11' 29.7"/_/_/_/_/_/_/_/_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Reply With Quote
  #2  
Old   
Rick Bean
 
Posts: n/a

Default Re: Calendar display in a VFP form - 09-24-2003 , 02:40 PM






Cass,
It's one of the ActiveX controls that MS supplies. Menu -> Tools -> Options ... -> Controls (tab) -> choose ActiveX controls. Once they load up, check Calendar Control (or maybe Microsoft Date and Time Picker) and click on OK. Now with your form open, click on the View Classes button on the Controls toolbar (it's the one with the "books"). Choose ActiveX Controls, and now just drag and drop the Calendar onto your Form.

Rick

"Cass Lewart" <rlewart (AT) shell (DOT) monmouth.com> wrote

Quote:
How can I include a calendar as part of the VFP6 form? I know that the
calendar exists but it does not appear on the tools menu.
Cass

--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Cass Lewart Voice (732) 264-9541 Fax (630) 566-0349/_/
_/ e-mail: rlewart (AT) monmouth (DOT) com _/_/_/_/_/_/_/_/_/_/_/_/_/
_/ N 40 deg 23' 41.9", W 74 deg 11' 29.7"/_/_/_/_/_/_/_/_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Reply With Quote
  #3  
Old   
Cass Lewart
 
Posts: n/a

Default Re: Calendar display in a VFP form - 09-24-2003 , 05:26 PM



Rick,
thanks for help. I see there are a million more controls in ActiveX. It
will take a while to try them all!
Cass

Rick Bean (rgbean (AT) NOSPAMmelange-inc (DOT) com) wrote:
: Cass,
: It's one of the ActiveX controls that MS supplies. Menu -> Tools -> =
: Options ... -> Controls (tab) -> choose ActiveX controls. Once they load =
: up, check Calendar Control (or maybe Microsoft Date and Time Picker) and =
: click on OK. Now with your form open, click on the View Classes button =
: on the Controls toolbar (it's the one with the "books"). Choose ActiveX =
: Controls, and now just drag and drop the Calendar onto your Form.

: Rick

Reply With Quote
  #4  
Old   
ShahJagat
 
Posts: n/a

Default Re: Calendar display in a VFP form - 09-25-2003 , 11:41 AM



I was reading your posting on the calendar control. How can I trap the date
the user selects and pass it to a variable?

Reply With Quote
  #5  
Old   
Rick Bean
 
Posts: n/a

Default Re: Calendar display in a VFP form - 09-25-2003 , 12:19 PM



Shah,
In my simple form test, I added the calendar control, and a button with the following code in it's Click event method:
Wait window dtoc(ThisForm.OleControl1.Object.Value)

The only thing "unusual", is the required "Object" qualifier, because the control doesn't return the date to the "normal" value property. (VFP really creates a "wrapper" around the control which you have to drill into.)

Rick

"ShahJagat" <shahjagat (AT) aol (DOT) com> wrote

Quote:
I was reading your posting on the calendar control. How can I trap the date
the user selects and pass it to a variable?

Reply With Quote
  #6  
Old   
Al Michel
 
Posts: n/a

Default Re: Calendar display in a VFP form - 09-26-2003 , 09:27 PM



On Thu, 25 Sep 2003 13:19:50 -0400, "Rick Bean"
<rgbean (AT) NOSPAMmelange-inc (DOT) com> wrote:

Quote:
Shah,
In my simple form test, I added the calendar control, and a button with the following code in it's Click event method:
Wait window dtoc(ThisForm.OleControl1.Object.Value)

The only thing "unusual", is the required "Object" qualifier, because the control doesn't return the date to the "normal" value property. (VFP really creates a "wrapper" around the control which you have to drill into.)

Rick

"ShahJagat" <shahjagat (AT) aol (DOT) com> wrote

I was reading your posting on the calendar control. How can I trap the date
the user selects and pass it to a variable?
Rick,
I've been using that neat calendar control in a little reminder program and
have been able to extract the date without using the object qualifier. E.g.
cDay=str(thisform.MonthDisplay.Day,2)
cM=str(thisform.MonthDisplay.Month,2)
cY=str(thisform.MonthDisplay.Year,4)
cDate=cM+'/'+cDay+'/'+cY
I renamed the control from OleControl1 to MonthDisplay. I don't remember
why I did it this way, perhaps because the usual value method didn't work
or because the Month, Day, Year are listed in the Properties of the
control.

Recently I tried to distribute the program to another machine on the
network and ran into a problem. I used the Setup wizard to generated the
distribution disk and when I tried to install them an OLE error code popped
up indicating "Class not registered, object is being ignored."
Any idea of how generate the proper distribution files? The FoxPro version
that I'm using is VFP5.
Al




Reply With Quote
  #7  
Old   
ShahJagat
 
Posts: n/a

Default Re: Calendar display in a VFP form - 09-26-2003 , 11:31 PM



For all the Active X control how can I find out how to trap its return value?.
Is it always 'Thisform.Olecontrol1.objectvalue'? Or is there a file or some
information somewhere which would tell me what each of the Active X control
does?

Reply With Quote
  #8  
Old   
Rick Bean
 
Posts: n/a

Default Re: Calendar display in a VFP form - 09-27-2003 , 12:10 PM



Shah,
When you right-click on the controls, most have a Help link - that's always a good place to start. While ThisForm and Object would be constant, the other levels will be dependent on how you name (or default) the object and it specific properties. (Note: As Al suggests, some controls also move the value to the VFP value property - again it's VFP version and control specific - sometimes you just have to "play" with it to get the value you want!)

Rick

"ShahJagat" <shahjagat (AT) aol (DOT) com> wrote

Quote:
For all the Active X control how can I find out how to trap its return value?.
Is it always 'Thisform.Olecontrol1.objectvalue'? Or is there a file or some
information somewhere which would tell me what each of the Active X control
does?

Reply With Quote
  #9  
Old   
ShahJagat
 
Posts: n/a

Default Re: Calendar display in a VFP form - 09-27-2003 , 07:39 PM



I am not too sure if I understand this. I tried to do
Thisform.olecontrol1.value... and the system tells me that this control
'Calendar control' does not have the value property.

When I right click the control and click the 'Help' it does not give me
anything. Am I supposed to install anything for this to work?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.