Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar class - Outlook style ??

Status
Not open for further replies.

jabhawk

Programmer
Joined
Apr 23, 2002
Messages
71
Location
US
Does anyone have a way to use the Outlook style of popping up a calander object for entering dates? The field is a fill-in until the user enters the field and selectes the dropdown button.

The ActiveX calendar class is too large to be place on my forms and my users like the Outlook style.

I have looked at the classes available with Fox but do not have the experiance with the CLass libraires to look for the object elsewhere. I have seen is on other VFP applications but do not know how it was done.

Any help is appreciated.
Jon B
Jonthan A Black
 
jabhawk

How about Outlook calendar itself, since your users like it so much.
Code:
oOutlook=CREATEOBJECT("outlook.application")
oNameSpace=oOutlook.GetNamespace("MAPI")
oDefaultFolder=oNameSpace.GetDefaultFolder(9)
oDefaultFolder.Display
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Nice but I just need to show a simple date selection object to return a valid date. The object I had seen before was a popup tool.

If there is a 3rd party tool for reasonale cost I would be interested in seeing it.

Jon B Jonthan A Black
 
jabhawk

Have you look at the Datetime picker Activex? Its the same as the one being used in Outlook. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
The closest that I found is the Calendar Control 8.0 (mscal.ocx).
My experiance with using these tools is limited. Would you have any sample code that would pop-up the object when the date field has focus or the user presses a button?

From looking at the object properties once there is an instance I should be able to control it. My biggest problem is how to attach it to the project and visualize it to the form.

Any help is mucho appriciated.
Jon B Jonthan A Black
 
jabhawk

Try this (I believe this is control you want to use)

Code:
PUBLIC oform1

oform1=NEWOBJECT("form1")
oForm1.addobject("dtPicker","dtPicker")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"
ENDDEFINE
DEFINE CLASS dtPicker as OleControl
  oleclass = "MSComCTL2.DTPICKER.2"
  VISIBLE = .T.
  height = 23
  width = 100
  left = 20
  top = 20
ENDDEFINE
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
go to the following:


and then search for vfpdatepicker...pure vfp and doesn't have the limitations of the microsoft datepicker control.

I've been using these vfpdatepicker and vfpdatetimepicker controls for some time now and they work great. Slighthaze = NULL
 
SlightHaze,
I looked at the site and I went with the cooldates class as it provided the simplest implementation. The vfpdatepicker class was too complex for me to install and support within out shop.

Thanks for the great link.
Jon B

Jonthan A Black
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top