Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calendar in my application
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00704912
Message ID:
00704925
Views:
15
Subclass the control by dropping it on a form. Then make sure it gets installed [and registered] properly on the target machine. A better solution might be to use a non-ActiveX control that is 100% VFP code and is available free with source code from:

http://www.kirtlandsys.com/Tools%20Page.htm

This control looks like the MonthView ActiveX control.

>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
>
>
>
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform