Forum Index > SerialPort.IsOpen Property

By: Guest Posted on: Jun 7 2018 at 04:25:58 AM
Mscomm has an IsOpen property, is there an equivalent with Scomm64 ?

When connecting to a USB serial device there is a need to see if the usb device has been unplugged.

By: Guest Posted on: Jun 7 2018 at 08:54:17 AM
MSComm does not have an .IsOpen property. It has a .PortOpen property that can be read or set. So you'd do something like:

If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
End If

and SComm64 has the same property and syntax for the .PortOpen property.

By: Guest Posted on: Jun 7 2018 at 11:03:50 AM
Is there a method with Scomm64 after it has connected to a desired comport (Scomm1.PortOpen=true) to detect if later this serial device has been disconnected?

Reading the value of Scomm1.PortOpen only returns True.


Reply - add comment to this topic
You may enter letters, numbers and standard punctuation only. HTML and other scripts/tags will be rejected
  Topic:- SerialPort.IsOpen Property

Your Name


Forum scripts and databases - Copyright (c) 2009 - 2012