Very good idea!
Very good idea!
Hello
I have been working on the Serial communications using MSCOMM32.
PUBLIC ComForm && ,TestCom
ComForm = CREATEOBJECT('Form')
ComForm.AddObject("Testcom","Olecontrol","MSCOMMLi b.MSComm")
ComForm.Testcom.CommPort = 2
ComForm.Testcom.Settings = "9600,E,7,1"
ComForm.Testcom.PortOpen = .T.
ComForm.Testcom.Output = Chr(87)+Chr(13) // Scale command to send weight data
ComForm.Testcom.Input
ComForm.Testcom.PortOpen = .F.
It does not return the scale information in Lianja but does in Foxpro 9.0
Please let me know what i am doing wrong.
Thank you for your time.
ComForm.Testcom.Input specified like that will call it as a method not access the property.
See below.
Hint:Code:PUBLIC ComForm && ,TestCom ComForm = CREATEOBJECT('Form') ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm") ComForm.Testcom.CommPort = 2 ComForm.Testcom.Settings = "9600,E,7,1" ComForm.Testcom.PortOpen = .T. ComForm.Testcom.Output = Chr(87)+Chr(13) // Scale command to send weight data result = ComForm.Testcom.Input ComForm.Testcom.PortOpen = .F.
in the console.
set debug on
obj = createObject("MSCOMMLib.MSComm")
then quit lianja and read the debug file in c:\lianja\debug
You can see all the methods and properties available for that activeX object.
I'd appreciate it if you post a new question in its own thread rather than use this one timeclock thread for every question. Its becoming unwieldy and long.
Last edited by barrymavin; 2024-05-15 at 21:13.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Bookmarks