📄 form3.frm
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4395
ClientLeft = 60
ClientTop = 345
ClientWidth = 6915
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4395
ScaleWidth = 6915
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton CmdKeep
Caption = "查看短消息"
Height = 435
Left = 180
TabIndex = 1
Top = 180
Width = 1065
End
Begin VB.TextBox TxtCom
Height = 3435
Left = 180
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Text = "Form3.frx":0000
Top = 810
Width = 6585
End
Begin MSCommLib.MSComm MSComm1
Left = 510
Top = 270
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
CommPort = 2
DTREnable = -1 'True
RThreshold = 1
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CmdKeep_Click()
MSComm1.InputMode = comInputModeText
If MSComm1.PortOpen = False Then MSComm1.PortOpen = True
MSComm1.Output = "AT+CMGF=0" & vbCrLf
Sleep 200
MSComm1.Output = "AT+CMGl=4" & vbCrLf
End Sub
Private Sub Form_Load()
TxtCom.Text = ""
End Sub
Private Sub MSComm1_OnComm()
Dim by As Variant
by = MSComm1.Input
TxtCom.Text = TxtCom.Text & CStr(by)
TxtCom.SelStart = Len(TxtCom.Text)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -