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

📄 form1.frm

📁 串口通信协议
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1 
   Caption         =   "串口测试程序"
   ClientHeight    =   9390
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   13695
   BeginProperty Font 
      Name            =   "ScriptC"
      Size            =   12
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H80000017&
   LinkTopic       =   "Form1"
   MousePointer    =   99  'Custom
   ScaleHeight     =   9390
   ScaleWidth      =   13695
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text3 
      Height          =   510
      Left            =   10800
      TabIndex        =   23
      Top             =   4560
      Width           =   1455
   End
   Begin VB.CheckBox Check1 
      Caption         =   "接收文件"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   390
      Left            =   10800
      TabIndex        =   22
      Top             =   6720
      Width           =   1695
   End
   Begin VB.CommandButton Command8 
      Caption         =   "文件长度"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   840
      TabIndex        =   21
      Top             =   7080
      Width           =   1695
   End
   Begin VB.CommandButton Command7 
      Caption         =   "清除"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   10560
      TabIndex        =   20
      Top             =   1680
      Width           =   1575
   End
   Begin VB.CommandButton Command6 
      Caption         =   "打开文件"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   840
      Picture         =   "Form1.frx":0000
      TabIndex        =   18
      Top             =   5880
      Width           =   1815
   End
   Begin VB.CommandButton Command5 
      Caption         =   "保存文件"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   840
      Picture         =   "Form1.frx":19C52
      TabIndex        =   17
      Top             =   4800
      Width           =   1815
   End
   Begin VB.CommandButton Command4 
      Caption         =   "打开串口"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5880
      TabIndex        =   16
      Top             =   7560
      Width           =   1815
   End
   Begin VB.CommandButton Command3 
      Caption         =   "关闭串口"
      DownPicture     =   "Form1.frx":338A4
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   8280
      TabIndex        =   15
      Top             =   7560
      Width           =   1815
   End
   Begin VB.ComboBox Combo5 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      ItemData        =   "Form1.frx":4D4F6
      Left            =   1560
      List            =   "Form1.frx":4D4FD
      TabIndex        =   12
      Text            =   "COM1"
      Top             =   1200
      Width           =   2775
   End
   Begin MSCommLib.MSComm MSComm1 
      Left            =   12360
      Top             =   360
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable       =   -1  'True
      InBufferSize    =   9086
      OutBufferSize   =   9086
   End
   Begin VB.ComboBox Combo4 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      ItemData        =   "Form1.frx":4D507
      Left            =   1560
      List            =   "Form1.frx":4D511
      TabIndex        =   7
      Text            =   "1"
      Top             =   3120
      Width           =   2775
   End
   Begin VB.ComboBox Combo3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      ItemData        =   "Form1.frx":4D51B
      Left            =   1560
      List            =   "Form1.frx":4D528
      TabIndex        =   6
      Text            =   "无"
      Top             =   2160
      Width           =   2775
   End
   Begin VB.ComboBox Combo2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      ItemData        =   "Form1.frx":4D538
      Left            =   1560
      List            =   "Form1.frx":4D545
      TabIndex        =   5
      Text            =   "8"
      Top             =   2640
      Width           =   2775
   End
   Begin VB.ComboBox Combo1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      ItemData        =   "Form1.frx":4D552
      Left            =   1560
      List            =   "Form1.frx":4D55C
      TabIndex        =   4
      Text            =   "9600"
      Top             =   1680
      Width           =   2775
   End
   Begin VB.CommandButton Command2 
      Caption         =   "清除"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   3480
      Picture         =   "Form1.frx":4D56C
      TabIndex        =   3
      ToolTipText     =   "要清空吗?"
      Top             =   5880
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "发送"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   3480
      MousePointer    =   99  'Custom
      Picture         =   "Form1.frx":671BE
      TabIndex        =   2
      ToolTipText     =   "马上发送,请稍等!"
      Top             =   4800
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1695
      Left            =   5640
      MultiLine       =   -1  'True
      TabIndex        =   1
      Top             =   1560
      Width           =   4215
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1935
      Left            =   5640
      LinkTimeout     =   1500
      MultiLine       =   -1  'True
      TabIndex        =   0
      Top             =   4080
      Width           =   4215
   End
   Begin VB.Label Label7 
      Alignment       =   2  'Center
      Caption         =   "接收文件字节数"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   10800
      TabIndex        =   24
      Top             =   4080
      Width           =   1455
   End
   Begin VB.Label Label9 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   10920
      TabIndex        =   19
      Top             =   7800
      Width           =   2655
   End
   Begin VB.Label Label6 
      Caption         =   "接收区"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4920
      TabIndex        =   14
      Top             =   2160
      Width           =   1935
   End
   Begin VB.Label Label5 
      Caption         =   "串口"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   13
      Top             =   1200
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "停止位"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   11
      Top             =   3120
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "校验位"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   10
      Top             =   2160
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "数据位"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   9
      Top             =   2640
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "波特率"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   8
      Top             =   1680
      Width           =   855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit     '当使用的变量未定义,报错。

    Dim s As Boolean
    Dim guanbi As Boolean
    Dim bote As Integer
    Dim shuju As Integer
    Dim tingzhi As Integer
    Dim jizhu As Integer
    Dim jy As String
    Dim wc As Integer
    Dim e As Integer
    Dim wenjianbaocun() As Byte
    Dim changdu As Double
    Dim bb As Integer
    Dim bb1 As Integer
    Dim bb2 As Integer
    Dim bb3 As Integer
    Dim bb4 As Integer
    Dim bb5 As String
    Dim tex As String
    Dim biaoji5 As Integer
    Dim x9   As Long
          
Private Sub Combo1_Click()
    Dim listIndex As Integer

⌨️ 快捷键说明

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