Solved

calender controls vfp

Posted on 2011-09-26
6
684 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 42

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 Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 

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 42

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 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