Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multithread in a form
Message
De
31/03/2005 06:56:27
 
 
À
30/03/2005 18:01:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01000134
Message ID:
01000228
Vues:
26
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform