MSComm Control

               

The MSComm control provides serial communications for your application by allowing the transmission and reception of data through a serial port.

Syntax

MSComm

Remarks

The MSComm control provides the following two ways for handling communications:

Each MSComm control you use corresponds to one serial port. If you need to access more than one serial port in your application, you must use more than one MSComm control. The port address and interrupt address can be changed from the Windows Control Panel.

Although the MSComm control has many important properties, there are a few that you should be familiar with first.

Properties Description
CommPort Sets and returns the communications port number.
Settings Sets and returns the baud rate, parity, data bits, and stop bits as a string.
PortOpen Sets and returns the state of a communications port. Also opens and closes a port.
Input Returns and removes characters from the receive buffer.
Output Writes a string of characters to the transmit buffer.