Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why Can't I use a PRG Based Form for OCX
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00923081
Message ID:
00923138
Vues:
33
I made these little changes and a brief (though not scientific) test showed the form.

>This is maintenance work on a VFP7 app. I know all about having to subclass an OCX like MSComm32 onto a form to avoid the "Class not licensed" error [the class IS registered, that is NOT the problem]. If I drop this OCX on a form and run the form it works under runtime on a non-developer machine. What aggravates the hell out of me is it won't work if the form is PRG based. For example, is there any way to make this work:
public loform
SET TALK OFF
SET EXCLUSIVE off
SET MULTILOCKS on
SET DELETED on
SET CENTURY on

loForm = CREATEOBJECT("LineDisplay")
loform.ADDOBJECT('oComm','oleCommControl','MSCOMMLib.MSComm.1')
loForm.Show(1)

DEFINE CLASS LineDisplay AS Form
   DataSession = 2
   PROTECTED PROCEDURE Init
   ENDPROC
   PROCEDURE Release
      RELEASE THIS
   ENDPROC
ENDDEFINE

DEFINE CLASS oleCommControl AS olecontrol
ENDDEFINE
>Trying with the AddObject() and commenting out the ADD OBJECT will not work either. By making this work, I mean on a non-developer machine under runtime. My preference is getting this to work in a PRG class instead of an SCX, but I will quit fighting this if the SCX is the only way to go. TIA!
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform