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

📄 levels.frm

📁 16 relay output channels and 16 isolated digital input channels LED indicators to show activated
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      End
      Begin VB.Label labLow 
         Caption         =   "Low:"
         Height          =   255
         Index           =   7
         Left            =   120
         TabIndex        =   40
         Top             =   600
         Width           =   375
      End
   End
   Begin VB.Frame frmLevel 
      Caption         =   "Channel 6"
      Height          =   975
      Index           =   6
      Left            =   4080
      TabIndex        =   32
      Top             =   1200
      Width           =   1695
      Begin VB.TextBox editHigh 
         Height          =   285
         Index           =   6
         Left            =   600
         TabIndex        =   34
         Text            =   "004.00000"
         Top             =   240
         Width           =   975
      End
      Begin VB.TextBox editLow 
         Height          =   285
         Index           =   6
         Left            =   600
         TabIndex        =   33
         Text            =   "000.00000"
         Top             =   600
         Width           =   975
      End
      Begin VB.Label labHigh 
         Caption         =   "High:"
         Height          =   255
         Index           =   6
         Left            =   120
         TabIndex        =   36
         Top             =   240
         Width           =   375
      End
      Begin VB.Label labLow 
         Caption         =   "Low:"
         Height          =   255
         Index           =   6
         Left            =   120
         TabIndex        =   35
         Top             =   600
         Width           =   375
      End
   End
   Begin VB.Frame frmLevel 
      Caption         =   "Channel 5"
      Height          =   975
      Index           =   5
      Left            =   2160
      TabIndex        =   27
      Top             =   1200
      Width           =   1695
      Begin VB.TextBox editHigh 
         Height          =   285
         Index           =   5
         Left            =   600
         TabIndex        =   29
         Text            =   "004.00000"
         Top             =   240
         Width           =   975
      End
      Begin VB.TextBox editLow 
         Height          =   285
         Index           =   5
         Left            =   600
         TabIndex        =   28
         Text            =   "000.00000"
         Top             =   600
         Width           =   975
      End
      Begin VB.Label labHigh 
         Caption         =   "High:"
         Height          =   255
         Index           =   5
         Left            =   120
         TabIndex        =   31
         Top             =   240
         Width           =   375
      End
      Begin VB.Label labLow 
         Caption         =   "Low:"
         Height          =   255
         Index           =   5
         Left            =   120
         TabIndex        =   30
         Top             =   600
         Width           =   375
      End
   End
   Begin VB.Frame frmLevel 
      Caption         =   "Channel 4"
      Height          =   975
      Index           =   4
      Left            =   240
      TabIndex        =   22
      Top             =   1200
      Width           =   1695
      Begin VB.TextBox editHigh 
         Height          =   285
         Index           =   4
         Left            =   600
         TabIndex        =   24
         Text            =   "004.00000"
         Top             =   240
         Width           =   975
      End
      Begin VB.TextBox editLow 
         Height          =   285
         Index           =   4
         Left            =   600
         TabIndex        =   23
         Text            =   "000.00000"
         Top             =   600
         Width           =   975
      End
      Begin VB.Label labHigh 
         Caption         =   "High:"
         Height          =   255
         Index           =   4
         Left            =   120
         TabIndex        =   26
         Top             =   240
         Width           =   375
      End
      Begin VB.Label labLow 
         Caption         =   "Low:"
         Height          =   255
         Index           =   4
         Left            =   120
         TabIndex        =   25
         Top             =   600
         Width           =   375
      End
   End
   Begin VB.Frame frmLevel 
      Caption         =   "Channel 3"
      Height          =   975
      Index           =   3
      Left            =   6000
      TabIndex        =   17
      Top             =   120
      Width           =   1695
      Begin VB.TextBox editHigh 
         Height          =   285
         Index           =   3
         Left            =   600
         TabIndex        =   19
         Text            =   "004.00000"
         Top             =   240
         Width           =   975
      End
      Begin VB.TextBox editLow 
         Height          =   285
         Index           =   3
         Left            =   600
         TabIndex        =   18
         Text            =   "000.00000"
         Top             =   600
         Width           =   975
      End
      Begin VB.Label labHigh 
         Caption         =   "High:"
         Height          =   255
         Index           =   3
         Left            =   120
         TabIndex        =   21
         Top             =   240
         Width           =   375
      End
      Begin VB.Label labLow 
         Caption         =   "Low:"
         Height          =   255
         Index           =   3
         Left            =   120
         TabIndex        =   20
         Top             =   600
         Width           =   375
      End
   End
   Begin VB.Frame frmLevel 
      Caption         =   "Channel 2"
      Height          =   975
      Index           =   2
      Left            =   4080
      TabIndex        =   12
      Top             =   120
      Width           =   1695
      Begin VB.TextBox editHigh 
         Height          =   285
         Index           =   2
         Left            =   600
         TabIndex        =   14
         Text            =   "004.00000"
         Top             =   240
         Width           =   975
      End
      Begin VB.TextBox editLow 
         Height          =   285
         Index           =   2
         Left            =   600
         TabIndex        =   13
         Text            =   "000.00000"
         Top             =   600
         Width           =   975
      End
      Begin VB.Label labHigh 
         Caption         =   "High:"
         Height          =   255
         Index           =   2
         Left            =   120
         TabIndex        =   16
         Top             =   240
         Width           =   375
      End
      Begin VB.Label labLow 
         Caption         =   "Low:"
         Height          =   255
         Index           =   2
         Left            =   120
         TabIndex        =   15
         Top             =   600
         Width           =   375
      End
   End
   Begin VB.Frame frmLevel 
      Caption         =   "Channel 1"
      Height          =   975
      Index           =   1
      Left            =   2160
      TabIndex        =   7
      Top             =   120
      Width           =   1695
      Begin VB.TextBox editHigh 
         Height          =   285
         Index           =   1
         Left            =   600
         TabIndex        =   9
         Text            =   "004.00000"
         Top             =   240
         Width           =   975
      End
      Begin VB.TextBox editLow 
         Height          =   285
         Index           =   1
         Left            =   600
         TabIndex        =   8
         Text            =   "000.00000"
         Top             =   600
         Width           =   975
      End
      Begin VB.Label labHigh 
         Caption         =   "High:"
         Height          =   255
         Index           =   1
         Left            =   120
         TabIndex        =   11
         Top             =   240
         Width           =   375
      End
      Begin VB.Label labLow 
         Caption         =   "Low:"
         Height          =   255
         Index           =   1
         Left            =   120
         TabIndex        =   10
         Top             =   600
         Width           =   375
      End
   End
   Begin VB.CommandButton CmdOK 
      Caption         =   "&OK"
      Height          =   375
      Left            =   7920
      TabIndex        =   6
      Top             =   720
      Width           =   855
   End
   Begin VB.CommandButton CmdCancel 
      Caption         =   "&Cancel"
      Height          =   375
      Left            =   7920
      TabIndex        =   0
      Top             =   240
      Width           =   855
   End
   Begin VB.Frame frmLevel 
      Caption         =   "Channel 0"
      Height          =   975
      Index           =   0
      Left            =   240
      TabIndex        =   1
      Top             =   120
      Width           =   1695
      Begin VB.TextBox editLow 
         Height          =   285
         Index           =   0
         Left            =   600
         TabIndex        =   5
         Text            =   "000.00000"
         Top             =   600
         Width           =   975
      End
      Begin VB.TextBox editHigh 
         Height          =   285
         Index           =   0
         Left            =   600
         TabIndex        =   3
         Text            =   "004.00000"
         Top             =   240
         Width           =   975
      End
      Begin VB.Label labLow 
         Caption         =   "Low:"
         Height          =   255
         Index           =   0
         Left            =   120
         TabIndex        =   4
         Top             =   600
         Width           =   375
      End
      Begin VB.Label labHigh 
         Caption         =   "High:"
         Height          =   255
         Index           =   0
         Left            =   120
         TabIndex        =   2
         Top             =   240
         Width           =   375
      End
   End
End
Attribute VB_Name = "frmLevels"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Sub EnableItems(iStart As Integer, iStop As Integer, bEnabled As Boolean)
    If iStop > 15 Then iStop = 15
    If iStart < 0 Then iStart = 0
    
    While iStart <= iStop
        editHigh(iStart).Enabled = bEnabled
        editLow(iStart).Enabled = bEnabled
        iStart = iStart + 1
    Wend
     
End Sub


Private Sub CmdCancel_Click()
    Unload frmLevels
End Sub


Private Sub CmdOK_Click()
Dim i As Integer
    
    'get selection
    For i = frmInit.cmbStartChl.ListIndex To frmInit.cmbStartChl.ListIndex + frmInit.cmbChlCount.ListIndex
        gTrigLevel(i).fHigh = Val(editHigh(i).Text)
        gTrigLevel(i).fLow = Val(editLow(i).Text)
    Next i
    
    Unload frmLevels
End Sub


Private Sub editHigh_KeyPress(Index As Integer, KeyAscii As Integer)
    If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then Exit Sub
    If KeyAscii = Asc(".") Then Exit Sub
    If KeyAscii = Asc("+") Then Exit Sub
    If KeyAscii = Asc("-") Then Exit Sub
    If KeyAscii = 8 Then Exit Sub       'Baekspace
    
    KeyAscii = 0                        'take off this key
End Sub


Private Sub editLow_KeyPress(Index As Integer, KeyAscii As Integer)
    If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then Exit Sub
    If KeyAscii = Asc(".") Then Exit Sub
    If KeyAscii = Asc("+") Then Exit Sub
    If KeyAscii = Asc("-") Then Exit Sub
    If KeyAscii = 8 Then Exit Sub       'Baekspace
    
    KeyAscii = 0                        'take off this key
End Sub


⌨️ 快捷键说明

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