Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSComm Control
Message
 
À
12/10/2001 05:27:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00567453
Message ID:
00568027
Vues:
31
>With VFP 7.0 in Windows 2000 i am trying to send data to a POS display connected to serial port 1 with the following code:
>
>* Comm 1 with 9600 baud, no parity, 8 data, and 1 stop bit.
>mscomm1.CommPort = 1
>mscomm1.Settings = "9600,n,8,1"
>mscomm1.PortOpen = .t.
>mscomm1.Output = CHR(12) + "test..."
>mscomm.PortOpen = .f.
>
>But i receive an error message when the program tries to open the door, this is the message: "OLE IDispatch exception code 0 from MSComm: Could not set comm state, there may be one or more invalid communications parameters...".
>
>Why did this happened? the port is really serial port 1, and i think that the parameters are OK, at least when i print a test page from the printer driver (i also defined this POS display as a printer), with the same parameters this display works well.
>
>Somebody help me...
>
>Thank you

What is CHR(12) ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform