Private Sub Command1_Click()
'haoma = Val(Text1.Text)
MSComm1.Output = "AT&F" & vbCr
Timer2.Interval = 500
Timer2.Enabled = True
End Sub
Private Sub Command2_Click()
MSComm1.Output = "ath" & vbCr '挂电话
End Sub
Private Sub Command3_Click()
MSComm1.Output = "ath" & vbCr '挂电话
Form1.Hide
End Sub
Private Sub Form_Load()
MSComm1.CommPort = 1
MSComm1.Settings = "115200,n,8,1"
MSComm1.InputMode = comInputModeBinary
MSComm1.PortOpen = True
End Sub
Private Sub MSComm1_OnComm()
If MSComm1.InBufferCount > 0 Then
Text2.Text = Hex(Val(MSComm1.Input))
End If
End Sub
Private Sub Timer1_Timer()
MSComm1.Output = "AT+VLS=7" & vbCr
Timer1.Enabled = False
End Sub
Private Sub Timer2_Timer()
MSComm1.Output = "AT+FCLASS=8" & vbCr
Timer3.Interval = 500
Timer2.Enabled = False
Timer3.Enabled = True
End Sub
Private Sub Timer3_Timer()
MSComm1.Output = "AT#VSPS=0" & vbCr
Timer4.Interval = 500
Timer3.Enabled = False
Timer4.Enabled = True
End Sub
Private Sub Timer4_Timer()
MSComm1.Output = "AT+VSP=1" & vbCr
Timer5.Interval = 500
Timer4.Enabled = False
Timer5.Enabled = True
End Sub
Private Sub Timer5_Timer()
haoma = Val(Text1.Text)
MSComm1.Output = "atd" & haoma & ";" & vbCr '拨打电话
Timer1.Interval = 5000
Timer5.Enabled = False
Timer1.Enabled = True
End Sub
Private Sub Command1_Click()
'haoma = Val(Text1.Text)
MSComm1.Output = "AT&F" & vbCr
Timer2.Interval = 500
Timer2.Enabled = True
End Sub
Private Sub Command2_Click()
MSComm1.Output = "ath" & vbCr '挂电话
End Sub
Private Sub Command3_Click()
MSComm1.Output = "ath" & vbCr '挂电话
Form1.Hide
End Sub
Private Sub Form_Load()
MSComm1.CommPort = 1
MSComm1.Settings = "115200,n,8,1"
MSComm1.InputMode = comInputModeBinary
MSComm1.PortOpen = True
End Sub
Private Sub MSComm1_OnComm()
If MSComm1.InBufferCount > 0 Then
Text2.Text = Hex(Val(MSComm1.Input))
End If
End Sub
Private Sub Timer1_Timer()
MSComm1.Output = "AT+VLS=7" & vbCr
Timer1.Enabled = False
End Sub
Private Sub Timer2_Timer()
MSComm1.Output = "AT+FCLASS=8" & vbCr
Timer3.Interval = 500
Timer2.Enabled = False
Timer3.Enabled = True
End Sub
Private Sub Timer3_Timer()
MSComm1.Output = "AT#VSPS=0" & vbCr
Timer4.Interval = 500
Timer3.Enabled = False
Timer4.Enabled = True
End Sub
Private Sub Timer4_Timer()
MSComm1.Output = "AT+VSP=1" & vbCr
Timer5.Interval = 500
Timer4.Enabled = False
Timer5.Enabled = True
End Sub
Private Sub Timer5_Timer()
haoma = Val(Text1.Text)
MSComm1.Output = "atd" & haoma & ";" & vbCr '拨打电话
Timer1.Interval = 5000
Timer5.Enabled = False
Timer1.Enabled = True
End Sub
这是一个利用川口拨打电话的程序,硬件上需要个位置的猫。