Information générale
Catégorie:
Contrôles ActiveX en VFP
I am in the beginning stages of trying to create a COM object that will be used inside an ASP page. I can instantiate the base MSComm control via the following syntax:
oComm = CREATEOBJECT('mscommlib.mscomm')
I was trying to subclass the control to add method code to the oncomm event. I don't need or want to add the subclass to a form...
>How are you trying to instantiate it? You have to add the OleCOntrol class to a form using AddObject() or NewObject(). It won;t instantiate otherwise.
>
>>When trying to instantiate a subclass of the MSCommLib.MSComm control I get the following error: Object class is invalid for this container. Why can't I create a workable subclass of MSComm?
>>
>>The code below was extracted from the VFP class browser. When I
>>looked at the properties sheet I did find the OleClass = MSCommLib.MSComm.1.
>>
>>
>>DEFINE CLASS mscomm AS olecontrol
>>
>>
>> Height = 100
>> Width = 100
>> Name = "mscomm"
>>
>>
>> PROCEDURE Init
>> SET TALK OFF
>> SET RESOURCE OFF
>> SET EXCLUSIVE OFF
>> SET CPDIALOG OFF
>> SET DELETED ON
>> SET EXACT OFF
>> SET SAFETY OFF
>> SET REPROCESS TO 3 SECONDS
>>
>> *-- Force server into unattended mode
>> SYS(2335,0)
>> ENDPROC
>>
>>
>>ENDDEFINE
Précédent
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