⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 GSMSMS调试软件 VB源程序
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{15D8B822-F4CF-11D3-88CD-0060970F3D65}#4.0#0"; "SMARTCLK.OCX..OCX"
Begin VB.Form Form1 
   Caption         =   "GSMSMS 中国电子技术信息网 http://www.cetinet.com"
   ClientHeight    =   6330
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   8580
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   6330
   ScaleWidth      =   8580
   StartUpPosition =   3  '窗口缺省
   WindowState     =   2  'Maximized
   Begin SmartClockInterface.ClockInterface ClockInterface1 
      Height          =   2055
      Left            =   5280
      TabIndex        =   21
      Top             =   600
      Width           =   2055
      _ExtentX        =   3625
      _ExtentY        =   3625
      BorderStyle     =   0
      Picture         =   "Form1.frx":030A
      ClockTime       =   .360972222222222
      HourPercent     =   .5
      SecondPercent   =   .7
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   8760
      TabIndex        =   19
      Text            =   "缓冲区:1"
      Top             =   1560
      Width           =   1455
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   5160
      Top             =   3480
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin MSCommLib.MSComm MSComm1 
      Left            =   5040
      Top             =   2760
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable       =   -1  'True
      RThreshold      =   1
      RTSEnable       =   -1  'True
      SThreshold      =   1
      InputMode       =   1
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   13
      Top             =   5955
      Width           =   8580
      _ExtentX        =   15134
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   4
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   2
            Object.Width           =   5927
            MinWidth        =   5927
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   2
            Object.Width           =   3519
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin VB.OptionButton Option1 
      Caption         =   "中文"
      Height          =   255
      Index           =   2
      Left            =   7680
      TabIndex        =   12
      Top             =   3840
      Width           =   855
   End
   Begin VB.OptionButton Option1 
      Caption         =   "英文"
      Height          =   255
      Index           =   1
      Left            =   7680
      TabIndex        =   11
      Top             =   3480
      Width           =   855
   End
   Begin VB.OptionButton Option1 
      Caption         =   "16进制"
      Height          =   255
      Index           =   0
      Left            =   7680
      TabIndex        =   10
      Top             =   3120
      Width           =   855
   End
   Begin VB.TextBox Text3 
      Height          =   3375
      Left            =   7560
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   9
      Top             =   4200
      Width           =   3735
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   8880
      TabIndex        =   8
      Text            =   "13660389916"
      Top             =   2520
      Width           =   1215
   End
   Begin VB.CommandButton Command6 
      Caption         =   "发送"
      Height          =   495
      Left            =   5760
      TabIndex        =   7
      Top             =   6480
      Width           =   975
   End
   Begin VB.CommandButton Command5 
      Caption         =   "接收"
      Height          =   495
      Left            =   5760
      TabIndex        =   6
      Top             =   5040
      Width           =   975
   End
   Begin VB.CommandButton Command4 
      Caption         =   "接收状态"
      Height          =   495
      Left            =   5760
      TabIndex        =   5
      Top             =   4320
      Width           =   975
   End
   Begin VB.CommandButton Command3 
      Caption         =   "设置号码"
      Height          =   495
      Left            =   5760
      TabIndex        =   4
      Top             =   5760
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "复位"
      Height          =   495
      Left            =   5760
      TabIndex        =   3
      Top             =   3600
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "链接"
      Height          =   495
      Left            =   5760
      TabIndex        =   2
      Top             =   2880
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   6615
      Left            =   600
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      Top             =   960
      Width           =   4335
   End
   Begin VB.Label Label7 
      Alignment       =   2  'Center
      Caption         =   "中国电子技术信息网"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   7800
      MouseIcon       =   "Form1.frx":17264
      MousePointer    =   99  'Custom
      TabIndex        =   0
      Top             =   720
      Width           =   3255
   End
   Begin VB.Label Label6 
      Alignment       =   2  'Center
      Caption         =   "SMS接收缓冲位置"
      Height          =   255
      Left            =   8640
      TabIndex        =   20
      Top             =   1200
      Width           =   1575
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Caption         =   "0"
      Height          =   255
      Left            =   9720
      TabIndex        =   18
      Top             =   3720
      Width           =   1095
   End
   Begin VB.Label Label4 
      Caption         =   "长度:"
      Height          =   255
      Left            =   8880
      TabIndex        =   17
      Top             =   3720
      Width           =   615
   End
   Begin VB.Label Label3 
      Caption         =   "SMS内容输入"
      Height          =   255
      Left            =   9000
      TabIndex        =   16
      Top             =   3240
      Width           =   1095
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Caption         =   "目标手机号码"
      Height          =   255
      Left            =   8760
      TabIndex        =   15
      Top             =   2160
      Width           =   1335
   End
   Begin VB.Label Label1 
      Caption         =   "串口数据监控"
      Height          =   255
      Left            =   1800
      TabIndex        =   14
      Top             =   600
      Width           =   1335
   End
   Begin VB.Menu mnufile 
      Caption         =   "文件"
      Begin VB.Menu mnuopen 
         Caption         =   "打开测试文件"
      End
      Begin VB.Menu mnusave 
         Caption         =   "保存测试文件"
      End
      Begin VB.Menu mnuclear 
         Caption         =   "清除测试文件"
      End
      Begin VB.Menu mnuf1 
         Caption         =   "-"
      End
      Begin VB.Menu mnuclrdistxt 
         Caption         =   "清除监控数据"
      End
      Begin VB.Menu mnuf2 
         Caption         =   "-"
      End
      Begin VB.Menu mnuexit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu mnusetup 
      Caption         =   "设置"
      Begin VB.Menu mnucommopen 
         Caption         =   "打开串口"
      End
      Begin VB.Menu mnucommseting 
         Caption         =   "设置串口"
      End
   End
   Begin VB.Menu mnuhelp 
      Caption         =   "帮助"
      Begin VB.Menu mnuCetinet 
         Caption         =   "中国电子技术信息网(&C)"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim SMSType As Integer
Dim Senddata() As Byte
Dim Readsmsno As Byte



Sub opentestnote()
wrap$ = Chr$(13) & Chr$(10)
CommonDialog1.Filter = "text filer (*.txt)|*.txt"
CommonDialog1.FileName = ""
CommonDialog1.ShowOpen      '使用通用对话框对象提示用户输入路径名
'If Err = cdlCancel Then Exit Sub
If CommonDialog1.FileName <> "" Then
Form1.MousePointer = 11
Open CommonDialog1.FileName For Input As #1 '打开用户所指定的输入文件(Open...For Input)
On Error GoTo toobig    ' 处理所有可能发生的错误
Do Until EOF(1)         '复制过程直至达到文件尾(EOF)或者字符串空间全部被占满为止
Line Input #1, lineoftext$  '将文件逐行复制到名为AllText$的字符串中(Line Input)
alltext$ = alltext$ & lineoftext$ & wrap$  '在文本框中显示AllText$字符串,并提供滚动条 '
Loop
Close #1
Form1.MousePointer = 0
Text3.Text = alltext$
End If
GoTo nextfile
toobig:
nextfile:
End Sub
Sub savetestnote()
wrap$ = Chr$(13) & Chr$(10)
CommonDialog1.Filter = "text filer (*.txt)|*.txt"
CommonDialog1.ShowSave      '使用通用对话框对象提示用户输入路径名
If CommonDialog1.FileName <> "" Then

       Open CommonDialog1.FileName For Output As #1     'COPY到记录
               Print #1, Text3.Text
       
       Close #1
End If
End Sub
Sub cleartestnote()
Form1.Text3.Text = ""
End Sub

Function ASCNUM(TXT As String) As Byte
i = Asc(TXT)
Select Case Asc(TXT)
Case 48
ASCNUM = 0
Case 49
ASCNUM = 1
Case 50
ASCNUM = 2
Case 51
ASCNUM = 3
Case 52
ASCNUM = 4
Case 53
ASCNUM = 5
Case 54
ASCNUM = 6
Case 55
ASCNUM = 7
Case 56
ASCNUM = 8
Case 57
ASCNUM = 9

Case 65
ASCNUM = 10
Case 66
ASCNUM = 11
Case 67
ASCNUM = 12
Case 68
ASCNUM = 13
Case 69
ASCNUM = 14
Case 70
ASCNUM = 15
Case Else
ASCNUM = 16
End Select

End Function


Private Sub Combo1_Click()
Readsmsno = Combo1.ListIndex + 1
End Sub

Private Sub Command1_Click()
'连接查询    [24][01][F0]
ReDim Senddata(2)
Senddata(0) = &H24
Senddata(1) = &H1
Senddata(2) = &HF0

Dim Length As Integer
Dim Sendstrings As String
Sendstrings = ""
For i = 0 To 2
a = Hex(Senddata(i))
    If Senddata(i) >= &H10 Then
    Sendstrings = Sendstrings & "[" & a & "]"
    Else
    Sendstrings = Sendstrings & "[" & "0" & a & "]"
    End If
Next i
Form1.Text1.Text = Form1.Text1.Text + Chr$(13) & Chr$(10) + Sendstrings + Chr$(13) & Chr$(10)

Form1.MSComm1.Output = Senddata 'Chr$(&H24) & Chr$(&H1) & Chr$(&HF0)

End Sub

Private Sub Command2_Click()
'复位命令    [24][01][F2]
ReDim Senddata(2)
Senddata(0) = &H24

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -