Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_olecalendar class in _datetime.vcx
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
_olecalendar class in _datetime.vcx
Divers
Thread ID:
00601256
Message ID:
00601256
Vues:
212
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform