Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling activex control in form
Message
From
15/11/2001 14:03:34
 
 
To
15/11/2001 13:19:16
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00581654
Message ID:
00582273
Views:
48
>>Wiki page recommends to use VFPCOM. VFPCOM dows not work with VFP 7.
>>So I used EVENTHANDLER() to attach my custom OnComm() event.
>>
>>I need to access to MSCOMM properties such as .input, .output
>>from attached event handler but this is impossible.
>>How to access control properties from binded event ?
>>
>
>Got me. I'm still using VFP6. My understanding is that VFP7 has VFPCOM built in. Check your documentation!

I explain my problem in VFP 6 terms.
Wiki page recommends to use the following sample.
It works, but I need to use loModemComm.Input property in basecustomclass.myoncomm event.

However, loModemComm variable is local variable and cannot be used.
How to use .Input property from myoncomm.oncomm() event without using global variable ?
DEFINE CLASS myoncomm AS basecustomclass
PROCEDURE oncomm
  * how I can use loModemComm.Input here. lOModemComm variable is out of
  * scope !?
   *-- Some code here...
ENDPROC
ENDDEFINE

In your code:

loModemComm = NEWOBJECT("MSCOMMLib.MSComm")
loEventHandler = NEWOBJECT("MyOnComm", "OnComm")
loVFPCOM = NEWOBJECT("VFPCOM.ComUtil")
loVFPCOM.BindEvents(loModemComm, loEventHandler)
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform