Private Sub Form_Load()
On Error Resume Next
MSComm1.Settings = "115200,N,8,1"
Open "32CSSCNT.CFG" For Input As #1
Input #1, COMPort
MSComm1.CommPort = COMPort
MSComm1.PortOpen = True
Close #1
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Open "32CSSCNT.CFG" For Output As #1
COMPort = MSComm1.CommPort
Print #1, COMPort
MSComm1.PortOpen = False
Close #1
End Sub
Private Sub mnuCOM_Click(Index As Integer)
On Error Resume Next
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
End If
MSComm1.Settings = "115200,N,8,1"
MSComm1.CommPort = Index
MSComm1.PortOpen = True
End Sub作者: nichal 時間: 2011-3-2 11:56
請問你遇到的問題是?