Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calendar in my application
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Calendar in my application
Miscellaneous
Thread ID:
00704912
Message ID:
00704912
Views:
56
I want to have a calendar in my application, the following code only works on my work station(development environment) with vfp 7.0 installed, and it gives me ole error 1426 when I run the app on any other work stations.

any help
the error message is
error 1426
OLE error code 0x80040154: Class not registered.

the code is in the right click event for a date filed called Load date
the control source is v_morder.load_date


#DEFINE C_CALCAPTION_LOC "Data Calendar"

oCalForm = Create('form')
oCalForm.NewObject("oleCalendar","_olecalendar","_datetime")

WITH oCalForm.oleCalendar
.date_column = "v_morder.load_date"
.columnalias = "v_morder"
.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)
This.Value = v_morder.load_date
IF This.Valid()
ELSE
This.Value = this.Parent.uoriginalvalue
replace v_morder.load_date WITH this.Parent.uoriginalvalue IN v_morder
ENDIF


Next
Reply
Map
View

Click here to load this message in the networking platform