If this property is set to True, ActiveX control will open serial port using the condition specified by CommPort Property and BaudRate Property. To know port has been opened successfully or not, check Active Property is True or False. If this property is set to False, then port will be closed. If you forget to close serial port when you terminate application, don’t worry, ActiveX control automatically close serial port.
Syntax
Return Value
Example
|
.CommPort = 0 ' Com1
.BaudRate = 9600 ' 9600 bps
.Active = True ' Open
If Not .Active Then
MsgBox "Error : Cannot open serial port!"
End If
|
|
m_secs.SetCommPort(0); // Com1
m_secs.SetBaudRate(9600); // 9600 bps
m_secs.SetActive(true); // Open
if(m_secs.GetActive())
MessageBox("Error : Cannot open serial port!");
|
Remarks
See Also
|