Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why Can't I use a PRG Based Form for OCX
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Why Can't I use a PRG Based Form for OCX
Divers
Thread ID:
00923081
Message ID:
00923081
Vues:
99
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:
LOCAL loForm
loForm = CREATEOBJECT("LineDisplay")
loForm.Show(1)

DEFINE CLASS LineDisplay AS Form

   DataSession = 2

   ADD OBJECT oComm as oleCommControl
   
   PROTECTED PROCEDURE Init
      SET TALK OFF
      SET EXCLUSIVE off
      SET MULTILOCKS on
      SET DELETED on
      SET CENTURY on
*!*      THIS.AddObject('oComm', 'olecontrol', 'MSCOMMLib.MSComm.1')
   ENDPROC
   PROCEDURE Release
      RELEASE THIS
   ENDPROC
ENDDEFINE
DEFINE CLASS oleCommControl AS olecontrol
   OleClass = 'MSCOMMLib.MSComm.1'
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!
Mark McCasland
Midlothian, TX USA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform