Information générale
Catégorie:
Contrôles ActiveX en VFP
Titre:
_olecalendar class in _datetime.vcx
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement