Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_olecalendar class in _datetime.vcx
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
_olecalendar class in _datetime.vcx
Miscellaneous
Thread ID:
00601256
Message ID:
00601256
Views:
215
I've got a button on a form with the following code in the click event:

#DEFINE C_CALCAPTION_LOC "Start of Tour"

IF EMPTY(booking.arrdate)
REPLACE booking.arrdate WITH DATE()
ENDIF

oCalForm = Create('form')
oCalForm.NewObject("oleCalendar","_olecalendar","_datetime")
WITH oCalForm.oleCalendar
.date_column = "booking.arrdate"
.RefreshDisplay()
.BackColor = THISFORM.BackColor
.Visible = .T.
ENDWITH
WITH oCalForm
.AutoCenter = .T.
.BorderStyle = 2
.MaxButton = .F.
.MinButton = .F.
.Height = oCalForm.oleCalendar.Height
.Width = oCalForm.oleCalendar.Width
.Caption = C_CALCAPTION_LOC
ENDWITH

oCalForm.Show(1)

Everything works fine on my development machine, however, when running on a machine without VFP or Microsoft Office installed, when I click the button an Open File dialog box opens looking for *.ocx. Must have something to do with the fact that the ocx used by _olecalendar needs to be registered in the Windows registry. Anyway, my question is, can the ocx be added to the project and then compiled into the exe? If not, how else can I get client machines without VFP and/or Office installed to work?

Thanks.

Jonathon Haid
Next
Reply
Map
View

Click here to load this message in the networking platform