Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MScomm class definition
Message
 
To
31/05/2005 15:33:31
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01018748
Message ID:
01018816
Views:
33
>>Mark,
>>Could you explain Why you want to use EVENTHANDLER()?
>VFP is a buggy product. That's for one.
>What should work right from the box, does not.
>So, I am trying to find a workaroud.

I have no problems when I use MSCOMMLib directly in the Form. What bothers you? You didn't receive what you expected?
Or you what to define the form not via Visual designer?
About VFP. It is not more BUGGY then everithing else. I think it is more stable. But this is onbly my oppinion.
oFrm = CREATEOBJECT("Form")
oFrm.AddProperty("InputVar")
oFrm.AddObject("MSCom","MSCom")
oFrm.Show()
ON KEY LABEL ESC CLEAR EVENTS
READ EVENTS






DEFINE CLASS MSCom AS OLECONTROL
     OleClass = "MSCOMMLib.MSComm.1"
     
     PROCEDURE Init
          this.commport = 1
          this.settings = '9600,N,8,1'
          this.dtrenable = .T.
          this.handshaking = 2
          this.rthreshold = 1
          this.sthreshold = 0
          this.rtsenable = .T.
          this.portopen = .T.
     ENDPROC

     PROCEDURE OnCom
          thisform.InputVar = this.Input
     ENDPROC
     
     PROCEDURE Destroy
         IF this.PortOpen
            this.portopen = .f.
         ENDIF
     ENDPROC
ENDDEFINE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform