|
-
March 9th, 2006, 12:29 AM
#7
Re: Comm Port
hii guys ,
there is no direct method to get the available commports
its a check and list basis to know the available ports
here is the code
Private Sub MDIForm_Load()
Dim I As Integer
On Error Resume Next
With GPS
If .PortOpen = True Then .PortOpen = False
For I = 1 To 16
.CommPort = I
.PortOpen = True
If err.Number = 0 Then
PortSel.AddItem "Com " & Format$(I)
.PortOpen = False
Else
err.Clear
End If
Next I
End With
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|