这是我的代码
'用于在COMBOBOX中显示所有联系电话 Private Sub BroadcastSMS_Load(作为对象发送,作为EventArgs发送)处理MyBase.Load
Try
If SerialPort1.IsOpen Then
SerialPort1.Close()
End If
Dim message As String
'' message = tbUserName.Text
message = " Notification : " + " " + tbMessage.Text
SerialPort1.Open()
If SerialPort1.IsOpen() Then
SerialPort1.Write("AT" & vbCrLf)
SerialPort1.Write("AT+CMGF=1" & vbCrLf)
SerialPort1.Write("AT+CMGS=" & Chr(34) & combobox1.Text & Chr(34) & vbCrLf)
SerialPort1.Write(message & Chr(26))
MsgBox("Message Sent")
SerialPort1.Close()
'用于发送短信
{{1}}