Length = 2 * Len(msg.Text)
Leng = Hex(Length)
If Len(Leng) = 1 Then
Leng = "0" & Leng
End If
AllLength = 15 + Length
MsgAdr = Trim(telc("8613800758500")) '肇庆动感地带短信信中心地址
TelNo = Trim(telc(teln.Text)) '手机号码
Smsg = Trim(AscII2Unicode(msg.Text)) '短信息内容
PDU = midx & TelNo & sufx & Leng & Smsg
'PDU = "0011000D91683167006059F100080108828265E55FEB4E50"
'AllLength = 23
myActiveX.Active = False
If Mobcomm.PortOpen = False Then
Mobcomm.PortOpen = True
SMSend AllLength, PDU '调用短信息发送程序
End If
If Mobcomm.PortOpen = True Then
Mobcomm.PortOpen = False
myActiveX.Active = True
End If
' myActiveX.SendTextSMS Trim(teln.Text), Trim(msg.Text)
'If Sendsms(Trim(teln.Text), Trim(msg.Text)) = True Then
'If Sendsms = True Then
' MsgBox "信息发送成功!"
'End If
End Sub
Private Function stringdeal(ByVal st As String)
stringdeal = Mid(st, InStr(st, Chr(10)) + 16)
End Function
Private Sub rm_Click() '阅读信息
Dim N As Integer
Dim Instring As String
www.chuibin.com = 0
Mobcomm.InputLen = 0
Sleep (100)
Instring = ""
Mobcomm.Output = "AT+CMGF=0" + vbCr
Sleep (400)
If Mobcomm.InBufferCount > 0 Then
Instring = Mobcomm.Input
Mobcomm.InBufferCount = 0
Mobcomm.OutBufferCount = 0
If InStr(Instring, "OK") Then
Mobcomm.Output = "AT+CMGR=" + index.Text + Chr(13) + Chr(10)
End If
Instring = ""
End IfSleep (500)If Mobcomm.InBufferCount > 0 Then
Instring = Mobcomm.Input
上一页 [1] [2] [3] [4] [5] [6] [7] 下一页