CommPort
Sets or Retrieves the port number (com port number) used by the control.
Available at Design time and Runtime. Read Only While the port is open.
MSComm32 and Comm32 have Similar but not identical behavior See Remarks below
 |
| |
Syntax |
object.CommPort = value |
| |
|
|
| |
object |
Name of the communications control |
| |
value |
A numerical expression indicating the Com port number |
| |
|
|
| |
Examples |
|
| |
|
object.CommPort = 2 |
'// Set the value (use Com2) |
| |
|
|
|
| |
|
Text1.Text = object.CommPort |
'// Retrieves the value |
| |
|
|
|
|
 |
Remarks:
Differences in behavior between MSComm32 and Comm32
MSComm32
Maximum value is 16 (Com1 to Com16)
Comm32
Maximum value is limited only by the operating system (Com1 to Com256 (Windows9x up to Com128) |