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

📄 frm5510com.frm

📁 基于化工行业造气岗位的自动化监控系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm5510COM 
   Caption         =   "frm5510COM"
   ClientHeight    =   3945
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   2730
   LinkTopic       =   "Form4"
   ScaleHeight     =   3945
   ScaleWidth      =   2730
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定&O"
      Height          =   375
      Left            =   1440
      TabIndex        =   14
      Top             =   3480
      Width           =   1200
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消&C"
      Height          =   375
      Left            =   120
      TabIndex        =   13
      Top             =   3480
      Width           =   1200
   End
   Begin VB.Frame Frame1 
      Caption         =   "ADAM5510通讯端口设置"
      Height          =   3375
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   2655
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   960
         TabIndex        =   6
         Top             =   360
         Width           =   1575
      End
      Begin VB.ComboBox Combo2 
         Height          =   300
         Left            =   960
         TabIndex        =   5
         Top             =   840
         Width           =   1575
      End
      Begin VB.ComboBox Combo3 
         Height          =   300
         Left            =   960
         TabIndex        =   4
         Top             =   1800
         Width           =   1575
      End
      Begin VB.ComboBox Combo4 
         Height          =   300
         Left            =   960
         TabIndex        =   3
         Top             =   2280
         Width           =   1575
      End
      Begin VB.ComboBox Combo5 
         Height          =   300
         Left            =   960
         TabIndex        =   2
         Top             =   2760
         Width           =   1575
      End
      Begin VB.ComboBox Combo6 
         Height          =   300
         Left            =   960
         TabIndex        =   1
         Top             =   1320
         Width           =   1575
      End
      Begin VB.Label Label1 
         Caption         =   "端口"
         Height          =   255
         Index           =   0
         Left            =   120
         TabIndex        =   12
         Top             =   360
         Width           =   495
      End
      Begin VB.Label Label1 
         Caption         =   "波特率"
         Height          =   255
         Index           =   1
         Left            =   120
         TabIndex        =   11
         Top             =   840
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "奇偶校验"
         Height          =   255
         Index           =   2
         Left            =   120
         TabIndex        =   10
         Top             =   1800
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "停止位"
         Height          =   255
         Index           =   3
         Left            =   120
         TabIndex        =   9
         Top             =   2280
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "控制流"
         Height          =   255
         Index           =   4
         Left            =   120
         TabIndex        =   8
         Top             =   2760
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "数据位"
         Height          =   255
         Index           =   5
         Left            =   120
         TabIndex        =   7
         Top             =   1320
         Width           =   615
      End
   End
End
Attribute VB_Name = "frm5510COM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
  Unload Me
End Sub

Private Sub cmdOK_Click()
    Dim strSetting As String
    strSetting = Combo2.Text & ","
    
    Select Case Combo3.ListIndex
        Case 0
            strSetting = strSetting & "n," & Combo6.Text & "," & Combo4.Text
        Case 1
            strSetting = strSetting & "m," & Combo6.Text & "," & Combo4.Text
        Case 2
            strSetting = strSetting & "o," & Combo6.Text & "," & Combo4.Text
    End Select
    Dim i As Long
    i = Combo1.ListIndex + 1
    WritePrivateProfileString "ADAM5510", "COM", CStr(i), App.Path + "\ini\system.ini"
    WritePrivateProfileString "ADAM5510", "SET", strSetting, App.Path + "\ini\system.ini"
End Sub

Private Sub Form_Load()
    Dim RetVal As Long
    RetVal = SetParent(Me.hWnd, frmMain.hWnd)

    Combo1.AddItem "COM1", 0
    Combo1.AddItem "COM2", 1
    Combo1.AddItem "COM3", 2
    Combo1.AddItem "COM4", 3
    Combo1.AddItem "COM5", 4
    Combo1.AddItem "COM6", 5
    
    Combo2.AddItem "2400", 0
    Combo2.AddItem "7200", 1
    Combo2.AddItem "9600", 2
    Combo2.AddItem "14400", 3
    Combo2.AddItem "19200", 4
    Combo2.AddItem "384000", 5
    Combo2.AddItem "576000", 6
    
    Combo6.AddItem "4", 0
    Combo6.AddItem "5", 1
    Combo6.AddItem "6", 2
    Combo6.AddItem "7", 3
    Combo6.AddItem "8", 4
    
    Combo3.AddItem "无", 0
    Combo3.AddItem "奇", 1
    Combo3.AddItem "偶", 2
    
    Combo4.AddItem "1", 0
    Combo4.AddItem "2", 1
    
    Combo5.AddItem "Xon/Xoff", 0
    Combo5.AddItem "无", 1
End Sub

⌨️ 快捷键说明

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