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

📄 frmmain.frm

📁 FLA-502控制、标定、分析用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmMain 
   Caption         =   "Form1"
   ClientHeight    =   2775
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4200
   LinkTopic       =   "Form1"
   ScaleHeight     =   2775
   ScaleWidth      =   4200
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "标定"
      Height          =   495
      Index           =   1
      Left            =   240
      TabIndex        =   13
      Top             =   840
      Width           =   1575
   End
   Begin VB.Frame Frame1 
      Height          =   2535
      Left            =   2160
      TabIndex        =   1
      Top             =   120
      Width           =   1935
      Begin VB.ComboBox Combo1 
         Height          =   300
         Index           =   1
         Left            =   840
         TabIndex        =   14
         Top             =   600
         Width           =   975
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Index           =   4
         Left            =   840
         TabIndex        =   12
         Top             =   1680
         Width           =   975
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Index           =   3
         Left            =   840
         TabIndex        =   11
         Top             =   1320
         Width           =   975
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Index           =   2
         Left            =   840
         TabIndex        =   10
         Top             =   960
         Width           =   975
      End
      Begin VB.CommandButton Command3 
         Caption         =   "取消"
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   2160
         Width           =   735
      End
      Begin VB.CommandButton Command2 
         Caption         =   "保存"
         Height          =   255
         Left            =   1080
         TabIndex        =   8
         Top             =   2160
         Width           =   735
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Index           =   0
         Left            =   840
         TabIndex        =   2
         Top             =   240
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "停止位"
         Height          =   255
         Left            =   120
         TabIndex        =   7
         Top             =   1800
         Width           =   615
      End
      Begin VB.Label Label4 
         Caption         =   "数据位"
         Height          =   255
         Left            =   120
         TabIndex        =   6
         Top             =   1440
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "效验位"
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   1080
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "波特率"
         Height          =   255
         Left            =   120
         TabIndex        =   4
         Top             =   720
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "串口"
         Height          =   255
         Left            =   120
         TabIndex        =   3
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "监视"
      Height          =   495
      Index           =   0
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   1575
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click(Index As Integer)
    Select Case Index
    Case 0
        frm五气分析仪浓度监视.Show vbModal
    Case 1
        frm五气分析仪标定.Show
    End Select
End Sub

Private Sub Command2_Click()
    SaveKey
End Sub
Private Sub SaveKey()
    Call cls注册表.UpdateKey(HKEY_CURRENT_USER, "DS", "AnalyzerPort", Combo1(0).Text)
    Call cls注册表.UpdateKey(HKEY_CURRENT_USER, "DS", "BaudRate", Combo1(1).Text)
    Call cls注册表.UpdateKey(HKEY_CURRENT_USER, "DS", "Parity", Combo1(2).Text)
    Call cls注册表.UpdateKey(HKEY_CURRENT_USER, "DS", "ByteSize", Combo1(3).Text)
    Call cls注册表.UpdateKey(HKEY_CURRENT_USER, "DS", "StopBits", Combo1(4).Text)

End Sub

Private Sub Command3_Click()
    TakeKey
End Sub
Private Sub TakeKey()
    Combo1(0).Text = cls注册表.GetKeyValue(HKEY_CURRENT_USER, "DS", "AnalyzerPort")
    Combo1(1).Text = cls注册表.GetKeyValue(HKEY_CURRENT_USER, "DS", "BaudRate")
    Combo1(2).Text = cls注册表.GetKeyValue(HKEY_CURRENT_USER, "DS", "Parity")
    Combo1(3).Text = cls注册表.GetKeyValue(HKEY_CURRENT_USER, "DS", "ByteSize")
    Combo1(4).Text = cls注册表.GetKeyValue(HKEY_CURRENT_USER, "DS", "StopBits")
End Sub

Private Sub Form_Load()
    Combo1(0).AddItem "COM1"
    Combo1(0).AddItem "COM2"
    Combo1(0).AddItem "COM3"
    Combo1(0).AddItem "COM4"
    
    Combo1(1).AddItem "300"
    Combo1(1).AddItem "600"
    Combo1(1).AddItem "1200"
    Combo1(1).AddItem "2400"
    Combo1(1).AddItem "4800"
    Combo1(1).AddItem "9600"
    Combo1(1).AddItem "19200"
    Combo1(1).AddItem "38400"
    Combo1(1).AddItem "43000"
    Combo1(1).AddItem "56000"
    Combo1(1).AddItem "57600"
    Combo1(1).AddItem "115200"
    
    Combo1(2).AddItem "NONE"
    Combo1(2).AddItem "ODD"
    Combo1(2).AddItem "EVEN"
    
    Combo1(3).AddItem "8"
    Combo1(3).AddItem "7"
    Combo1(3).AddItem "6"

    Combo1(4).AddItem "1"
    Combo1(4).AddItem "2"
    
    TakeKey
    
    Analyzer.排气分析仪 = "FLA-502"
End Sub

⌨️ 快捷键说明

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