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

📄 fd0.frm

📁 一个用 VB 编写的基于串口通信的简单监测程序
💻 FRM
字号:
VERSION 5.00
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCHRT20.OCX"
Begin VB.Form formshow 
   BackColor       =   &H8000000C&
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   BeginProperty Font 
      Name            =   "华文新魏"
      Size            =   18
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   WindowState     =   2  'Maximized
   Begin VB.Timer Timer1 
      Left            =   360
      Top             =   840
   End
   Begin MSChart20Lib.MSChart MSChart1 
      Height          =   6855
      Left            =   1440
      OleObjectBlob   =   "fd0.frx":0000
      TabIndex        =   6
      Top             =   840
      Width           =   11895
   End
   Begin VB.CommandButton Command6 
      Caption         =   "CO"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   120
      TabIndex        =   5
      Top             =   6720
      Width           =   1215
   End
   Begin VB.CommandButton Command5 
      Caption         =   "H2S"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   120
      TabIndex        =   4
      Top             =   5520
      Width           =   1215
   End
   Begin VB.CommandButton Command4 
      Caption         =   "CH4"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   120
      TabIndex        =   3
      Top             =   4320
      Width           =   1215
   End
   Begin VB.CommandButton Command3 
      Caption         =   "温度"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   120
      TabIndex        =   2
      Top             =   3120
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "压力"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   120
      TabIndex        =   1
      Top             =   1920
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "返回"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   13440
      TabIndex        =   0
      Top             =   9120
      Width           =   1215
   End
   Begin VB.Label Label7 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   9000
      TabIndex        =   13
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label6 
      BackColor       =   &H8000000C&
      Caption         =   "当前时间"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   7680
      TabIndex        =   12
      Top             =   240
      Width           =   1215
   End
   Begin VB.Label Label5 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3840
      TabIndex        =   11
      Top             =   240
      Width           =   1215
   End
   Begin VB.Label Label4 
      BackColor       =   &H8000000C&
      Caption         =   "当前日期"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2520
      TabIndex        =   10
      Top             =   240
      Width           =   1215
   End
   Begin VB.Label Label3 
      BackColor       =   &H8000000C&
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   8040
      TabIndex        =   9
      Top             =   8400
      Width           =   615
   End
   Begin VB.Label Label2 
      BackColor       =   &H8000000C&
      Caption         =   "label2"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   6600
      TabIndex        =   8
      Top             =   8400
      Width           =   1215
   End
   Begin VB.Label Label1 
      BackColor       =   &H8000000C&
      Caption         =   "label1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   4440
      TabIndex        =   7
      Top             =   8400
      Width           =   2055
   End
End
Attribute VB_Name = "formshow"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
formshow.Hide
formlist.Show

End Sub

Public Sub Command2_Click()
MSChart1.Title.Text = "压力变化图"
With MSChart1.Title.VtFont
 .Name = "幼圆"
 .Style = VtFontStyleItalic
 .Size = 18
 .VtColor.Set 255, 0, 0
Label1.FontName = "宋体"
Label1.FontSize = 18
Label1.Caption = "当前压力值"
Label3.Caption = "Pa"
End With
painting 1

End Sub

Private Sub Command3_Click()
MSChart1.Title.Text = "温度变化图"
With MSChart1.Title.VtFont
 .Name = "幼圆"
 .Style = VtFontStyleItalic
 .Size = 18
 .VtColor.Set 255, 0, 0
Label1.FontName = "宋体"
Label1.FontSize = 18
Label1.Caption = "当前温度值"
Label3.Caption = "T "
 End With
painting 2

End Sub

Private Sub Command4_Click()
MSChart1.Title.Text = "CH4浓度变化图"
With MSChart1.Title.VtFont
 .Name = "幼圆"
 .Style = VtFontStyleItalic
 .Size = 18
 .VtColor.Set 255, 0, 0
Label1.FontName = "宋体"
Label1.FontSize = 18
Label1.Caption = "当前CH4值"
Label3.Caption = "Mg/L"
End With
painting 3

End Sub

Private Sub Command5_Click()
MSChart1.Title.Text = "H2S浓度变化图"
With MSChart1.Title.VtFont
 .Name = "幼圆"
 .Style = VtFontStyleItalic
 .Size = 18
 .VtColor.Set 255, 0, 0
Label1.FontName = "宋体"
Label1.FontSize = 18
Label1.Caption = "当前H2S值"
Label3.Caption = "Mg/L"
End With
painting 4

End Sub

Private Sub Command6_Click()
MSChart1.Title.Text = " CO浓度变化图"
With MSChart1.Title.VtFont
 .Name = "幼圆"
 .Style = VtFontStyleItalic
 .Size = 18
 .VtColor.Set 255, 0, 0
Label1.FontName = "宋体"
Label1.FontSize = 18
Label1.Caption = "当前CO值"
Label3.Caption = "Mg/L"
End With
painting 5

End Sub


Private Sub Form_Load()
Label5.FontSize = 14
Label5.FontName = "Times New Roman"
Label5.Caption = Left$(Now, 7)
Label7.FontSize = 14
Label7.FontName = "Times New Roman"
Label7.Caption = Right$(Now, 8)
Set obj = GetObject("a:\data.xls")
Command2_Click

End Sub



Private Sub Timer1_Timer()
Label7.FontName = "Times New Roman"
Label7.FontSize = 14
Label7.Caption = Time$
End Sub


⌨️ 快捷键说明

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