Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassing MSComm Control
Message
De
19/07/2000 12:02:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00393493
Message ID:
00394377
Vues:
9
>< snipped >
>>FWIW, I instantiate ActiveX objects programmatically as often as possible. Dragging and dropping ActiveX objects onto forms creates dependencies on that version of the ActiveX, if I remember correctly.
>>
>>HTH,
>>Jon
>
>Jon,
>This is good technique (one which Doug Hennig highly recommends for the reason you stated). However, the problem here (as I see it) is the creation of an ActiveX control created in VFP and used elsewhere (in this case ASP).
>
>If it were being done entirely in VFP, then you could instantiate the ActiveX control, instantiate a VFP object that has the same events and use VFPCOM to bind them. If it were being done with VB, you could DIM a variable using the WithEvents clause and bind the events to a custom object that way. Either way is version independent.
>
>The environment doesn't lend itself to either of these. I don't think VBScript offers event binding (I may be wrong) and using VFPCOM to bind to an object within itself won't work either.

Im not a VBScript programmer, so I may be out of my league. But if I remember correctly, VBScript doesnt support event handlers at all.

FWIW, I recently purchased an ActiveX that provides a way to implement the ActiveX's event handlers from within an ASP page.
Here's a snippet of the VBScript code:
Do
ActiveXControl1.WaitForEvent 10000 ‘Wait for 10 seconds
Select Case ActiveXControl1.LastEventType
Case EVENT_STATUS ' status event occurred
i = 0
Text1.SelText = "Status" & vbCrLf
Case EVENT_NEGOTIATION ' negotiation event occurred
Text1.SelText = "Negotiation" & vbCrLf
Case EVENT_STARTTIME 'starttime event occurred
Text1.SelText = "StartTime" & vbCrLf
Case EVENT_ENDTIME 'endtime event occurred
Text1.SelText = "EndTime" & vbCrLf
Case EVENT_COMPLETE 'complete event occurred
Text1.SelText = "Complete" & vbCrLf
Case EVENT_TIMEOUT 'timeout event occurred
i = i + 1
Text1.SelText = "Timeout" & vbCrLf
End Select
Loop Until (ActiveXControl1.LastEventType = EVENT_COMPLETE) Or (i = 9 ) ‘ 90 idle seconds


FWIW, these events are not user-generated, but are generated during the process of a fax transmission and are used to notify your app of the progress.

Jon
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform