Private Sub Form_Load() MSComm1.Settings ="9600,N,8,1" For i = 1 To 10 MSComm1.CommPort = i On Error GoTo N MSComm1.PortOpen = True N: If MSComm1.PortOpen = True Then Exit For End If Next End Sub Private Sub MSComm1_OnComm() If MSComm1.CommEvent Then MsgBox " You have a phone call " End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)