The next section of this tutorial will show you how to use the MSComm control. To add this control to your project, display the Components dialog (Project | Components...). Then scroll down, and check the box next to the Microsoft Comm Control. This control will only be available if you have Visual Basic Professional or above.
The Communications control provides an interface to a standard set of communications commands. It allows you to establish a connection to a serial port, connect to another communication device (a modem, for instance), issue commands, exchange data, and monitor and respond to various events and errors that may be encountered during a serial connection.
Possible Uses
- To dial a phone number.
- To monitor a serial port for incoming data.
- To create a full-featured terminal program.
There are a number of sample applications that use the MSComm control. There are the the Dialer.vbp (in the Dialer folder) and VBTerm.vbp (in the MSComm folder) sample applications which are listed in the samples directory, demonstrate simple and complex (respectively) programming techniques of the Communications control. These are also available for download here. There is also another VB Web example, which you can download here. A screen shot is below.
Comments