I added mscomm32.ocx to the class, and I copied the code to cmdbutton.click:
PUBLIC ComForm
ComForm = CREATEOBJECT('Form')
ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
ComForm.Testcom.CommPort = 2 && Use Comm2, The second Serial Port.
ComForm.Testcom.Settings = "14400,N,8,1" && 14.4 Kbaud, No Parity,
&& 8 data Bits, 1 Stop Bit
ComForm.Testcom.PortOpen = .T.
ComForm.Testcom.Output = "ATDT555-1234" + chr(13) && Dialing the number
* The chr(13) is needed to complete the modem command sequence
ComForm.Testcom.PortOpen = .F.
***** End Code *****
when I compiled, I got error:
ERROR#: 15
Not a table
ComForm.Testcom.PortOpen = .F.
am I missing something?
thanks for the help.
regards,
Jerry
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only