Solved

calender controls vfp

Posted on 2011-09-26
6
675 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Programming code with runtime form 4 632
VFP9 SQL Union and Group by 5 228
Deleteing duplicate records 2 57
Delphi Dbf export problem to a Visual Foxpro application 6 187
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…
This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

786 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