Solved

calender controls vfp

Posted on 2011-09-26
6
653 Views
Last Modified: 2012-05-12
HI: A big question. Max points because this may need a bit of hand holding.
I need to add a calender control to a form. When a user selects a date field a form opens with a calender displayed. Selecting a date returns the date selected to the field on the form.
Please beware - I have looked at this but the concept of classes is way over my head. I am afraid you may need to be patient. Explain how to do every step.
If anybody has  a 'dummies do calender controls' document I would be grateful!
Also it may not be tackled all in one day.
You have been warned!
Thanks!
0
Comment
Question by:ClaytonGlass
  • 3
  • 2
6 Comments
 
LVL 41

Expert Comment

by:pcelba
ID: 36598952
The easiest way is to use following command:
ACTIVATE WINDOW calendar
The date selected is then in _diarydate  system variable.

More complicated sample is in Task Pane Manager - Solution/Samples - Foundation Classes - Add data-bound calendar.

And if you need expert advice then read page 9 of this book: http://www.hentzenwerke.com/catalog/megafox.htm
or page 118 of this book: http://www.hentzenwerke.com/catalog/kilofox.htm

This also could work: http://fox.wikis.com/wc.dll?Wiki~CalendarControl
http://fox.wikis.com/wc.dll?Wiki~Diary/Calendar
0
 

Author Comment

by:ClaytonGlass
ID: 36599063
Thanks, pcelba (again). I did look in the wikis but got lost very quickly.
did find ACTIVATE WINDOW a few minutes ago..but just hold my hand a little...this is the code I have put on a button on the form:
ACTIVATE WINDOW CALENDAR
due = _DIARYDATE
THISFORM.DUE1.Value = due
Which sets the date currently in the calendar.
To reset the date to one of choice I have to select the date in the calendar, close the calendar, and click the button again. Is this right? Or can I change the date without having to reclick?
Thanks!
0
 
LVL 12

Expert Comment

by:jrbbldr
ID: 36599228
When a user selects a date field a form opens with a calender displayed

Do you really need the Calendar to open in its own separate FORM?
Or can a Calendar object open on the existing Form thereby allowing the user to select the date?

If the later then you can just add the Microsoft Date and Time Picker Control object to your Form.

With more clarification we can better assist you.

Good Luck


0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:ClaytonGlass
ID: 36599300
Ideally calendar object on the same form.....I have added MSComCtl2 to my object browser but am lost as to what to do next....and when I close the browser Iose the object (I warned you I was dumb)
0
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
ID: 36599582
The Calendar window will display whatever date you assign to _diarydate.
0
 

Author Closing Comment

by:ClaytonGlass
ID: 36599595
Thanks, jbblbr but I have gone with pcelba.
I appreciate that the date/time picker may look great but I just like the foxpro one. I do like the diary content part, too!
Thanks to all concerned for their help
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now