frmdxzx.frm
来自「通过GSMMODEM发送短信并可自动接收短信做相应处理」· FRM 代码 · 共 66 行
FRM
66 行
VERSION 5.00
Begin VB.Form Frmdxzx
Caption = "短信中心配置"
ClientHeight = 2730
ClientLeft = 6090
ClientTop = 3300
ClientWidth = 4500
LinkTopic = "Form2"
ScaleHeight = 2730
ScaleWidth = 4500
Begin VB.CommandButton Command1
Caption = "保存"
Height = 495
Left = 1320
TabIndex = 2
Top = 1560
Width = 1575
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 375
Left = 2160
TabIndex = 0
Top = 600
Width = 2055
End
Begin VB.Label Label1
Caption = "当地短信中心号码"
Height = 375
Left = 120
TabIndex = 1
Top = 600
Width = 1575
End
End
Attribute VB_Name = "Frmdxzx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If FRMMAIN.MSComm1.PortOpen = True Then
fx = "AT+CSCA=" & Text1.Text & vbCr
FRMMAIN.MSComm1.Output = fx '设置短信中心号码
End If
ReceiveData = ReceiveData + FRMMAIN.MSComm1.Input '循环获取串口反馈值
j = InStr(ReceiveData, "OK") 'INSTR 这个函数可以找到指定的字符串在另一字符串 中最先出现的位置
If j > 0 Then
MsgBox "设置成功!"
End If
If j = 0 Then
MsgBox "设置成功!"
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?