Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multithread in a form
Message
From
31/03/2005 06:56:27
 
 
To
30/03/2005 18:01:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01000134
Message ID:
01000228
Views:
28
Mark,

>I would like to have two processes in the form that are reading different com ports. I dont have a problem reading port. But my problem is that I am using do while inside of the code that reads from a port. So when I start first process I cannot start the other. Any idea?
>

3 methods come to mind, assuming you are using MSCOMM32.OCX.

Use the control's ONCOMM event. Place your processing code in that method. With the RThreshold property set to 1 or greater, this event fires with each character received.

Use timer(s) as necessary to poll the ports for data.

Use a combination of the above 2. This file uses this method.

DO WHILEs are to be avoided, IMHO.
Previous
Reply
Map
View

Click here to load this message in the networking platform