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

📄 frmrs232.frm

📁 用VB编写的RS232测试软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form2 
   BackColor       =   &H00C0C000&
   Caption         =   "RS-232----R & D 实验室"
   ClientHeight    =   8310
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   11880
   LinkTopic       =   "Form1"
   ScaleHeight     =   8310
   ScaleWidth      =   11880
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text2 
      Height          =   1935
      Left            =   6000
      TabIndex        =   17
      Text            =   " "
      Top             =   960
      Width           =   4215
   End
   Begin VB.TextBox Text1 
      Height          =   1935
      Left            =   1080
      TabIndex        =   16
      Text            =   " "
      Top             =   960
      Width           =   4215
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   720
      Top             =   0
   End
   Begin VB.CommandButton Command4 
      Caption         =   "采集"
      Height          =   375
      Left            =   6000
      TabIndex        =   3
      Top             =   0
      Width           =   855
   End
   Begin VB.CommandButton Command3 
      Caption         =   "COM3"
      Height          =   375
      Left            =   5160
      TabIndex        =   2
      Top             =   0
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "COM2"
      Height          =   375
      Left            =   4320
      TabIndex        =   1
      Top             =   0
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "COM1"
      Height          =   375
      Left            =   3480
      TabIndex        =   0
      Top             =   0
      Width           =   855
   End
   Begin MSCommLib.MSComm MSComm1 
      Left            =   120
      Top             =   0
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable       =   -1  'True
      RTSEnable       =   -1  'True
   End
   Begin VB.Label Label5 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   6720
      TabIndex        =   15
      Top             =   6240
      Width           =   1575
   End
   Begin VB.Label Label4 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   4200
      TabIndex        =   14
      Top             =   6240
      Width           =   1575
   End
   Begin VB.Label Label2 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   4200
      TabIndex        =   13
      Top             =   5640
      Width           =   1575
   End
   Begin VB.Label Label1 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   960
      TabIndex        =   12
      Top             =   5640
      Width           =   1575
   End
   Begin VB.Label Label3 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   960
      TabIndex        =   11
      Top             =   6240
      Width           =   1575
   End
   Begin VB.Label fheat 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   4200
      TabIndex        =   10
      Top             =   5040
      Width           =   1575
   End
   Begin VB.Label aflow1 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   4200
      TabIndex        =   9
      Top             =   4440
      Width           =   1575
   End
   Begin VB.Label heat 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   4200
      TabIndex        =   8
      Top             =   3840
      Width           =   1575
   End
   Begin VB.Label flow1 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   960
      TabIndex        =   7
      Top             =   5040
      Width           =   1575
   End
   Begin VB.Label P1 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   960
      TabIndex        =   6
      Top             =   4440
      Width           =   1575
   End
   Begin VB.Label T1 
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      Height          =   495
      Left            =   960
      TabIndex        =   5
      Top             =   3840
      Width           =   1575
   End
   Begin VB.Label date1 
      Alignment       =   2  'Center
      BackColor       =   &H00800000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " "
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   9120
      TabIndex        =   4
      Top             =   0
      Width           =   2655
   End
   Begin VB.Menu mnuFile 
      Caption         =   "文件"
      Begin VB.Menu mnuQuit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu mnuGo 
      Caption         =   "系统启动"
   End
   Begin VB.Menu mnuUser 
      Caption         =   "用户登记"
   End
   Begin VB.Menu mnuSetClock 
      Caption         =   "设定时钟"
   End
   Begin VB.Menu mnuComm 
      Caption         =   "通讯"
   End
   Begin VB.Menu mnuRecord 
      Caption         =   "记录"
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Sub Fun_init()                  '初始化
    Xaxi = 0                    'X坐标=0
    x1 = 0                      '
    y1 = 0                      'Y坐标=0
    pfadr = 1                   '页首=1
    dataNum = 10                '显示50个数据
    peadr = dataNum             '页尾初值
    pageLen = dataNum           '页长初值
    Pic_Background.ScaleWidth = dataNum ' - 1
End Sub

Sub Fun_Plot(fData As Single)           '画点
    If Xaxi <= Pic_Background.ScaleWidth Then
'Plot data points
       Pic_Background.Line (x1, y1)-(Xaxi, fData), RGB(255, 0, 0)
       x1 = Xaxi
       y1 = fData
       Xaxi = Xaxi + 1
    Else
    End If
End Sub

Sub Fun_PlotLine(plotNum As Integer)          '画线
    Dim j As Integer
    Pic_Background.Cls
    Xaxi = 0
    x1 = 0
    For j = 1 To plotNum
    'Fun_Plot (DataArray1(i, j))
    Next j
End Sub

Sub Delay10()
Dim i As Integer
    For i = 0 To 30000
    Next i
End Sub

Sub Fun_Append()      '向文件中添加一个记录函数
    i = LastNum + 1
    recData.recdate = xdate
    recData.rectime = Str(Hour(X)) + ":" + Str(Minute(X))

⌨️ 快捷键说明

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