Comm32 Logo
Home Button   

Topic:   Use input function out of the form where it is positioned OCX

By: MaurizioPosted on: May 27 2013 at 11:29:30 AM
I can use input function out of the form where it is positioned OCX SComm.
I have to use the input function in module.bas
Is possible?
Now recive data only in OnComm event.
Thanks

By: GuestPosted on: May 29 2013 at 08:46:15 AM
In your module.bas why can you not use the code

Mystring = Form1.SComm1.Input

That will use the input funtion in the module.

It is not possible to place the oncomm event in a bas module. But of course you can use the INPUT function in a module as in my example above.

By: MaurizioPosted on: Jun 3 2013 at 12:48:51 PM
I solved.
I now proceed with the payment of the license.
thanks

By: MaurizioPosted on: Jul 26 2013 at 04:14:40 PM
I thought had resolved, but after some time of continuous readings the software crashes and you need to kill the process.
I attach a small test project.

By: Support Posted on: Jul 28 2013 at 10:43:22 PM
thank you for sending your test project.

Your application is not using the evReceive OnComm event to receive data so please disable the RThreshold property. set it to zero. Because your RThreshold=1 the ocx generates OnComm events which your application does not serivice. An error in ocx v7.0.06 causes a deadlock situation which hangs the application. (we'll fix this error but in the meantime set RThreshold=0.

Another thing. Because you send data and then poll .Input in a tight loop I would suggest also disabling the .OverlappedIO property especially if your application will be deployed in Windows 7 and Windows 8.