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

📄 frmfilter.frm

📁 16 relay output channels and 16 isolated digital input channels LED indicators to show activated
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmFilter 
   Caption         =   "Filter Configuration"
   ClientHeight    =   1815
   ClientLeft      =   60
   ClientTop       =   405
   ClientWidth     =   7260
   LinkTopic       =   "Form1"
   ScaleHeight     =   1815
   ScaleWidth      =   7260
   StartUpPosition =   1  'CenterOwner
   Begin VB.TextBox txtLoValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   7
      Left            =   1050
      TabIndex        =   35
      Text            =   "1"
      Top             =   1320
      Width           =   555
   End
   Begin VB.TextBox txtLoValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   6
      Left            =   1650
      TabIndex        =   34
      Text            =   "1"
      Top             =   1320
      Width           =   555
   End
   Begin VB.TextBox txtLoValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   5
      Left            =   2235
      TabIndex        =   33
      Text            =   "1"
      Top             =   1320
      Width           =   555
   End
   Begin VB.TextBox txtLoValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   4
      Left            =   2835
      TabIndex        =   32
      Text            =   "1"
      Top             =   1320
      Width           =   555
   End
   Begin VB.TextBox txtLoValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   3
      Left            =   3420
      TabIndex        =   31
      Text            =   "1"
      Top             =   1320
      Width           =   555
   End
   Begin VB.TextBox txtLoValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   2
      Left            =   4020
      TabIndex        =   30
      Text            =   "1"
      Top             =   1320
      Width           =   555
   End
   Begin VB.TextBox txtLoValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   1
      Left            =   4605
      TabIndex        =   29
      Text            =   "1"
      Top             =   1320
      Width           =   555
   End
   Begin VB.TextBox txtHiValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   7
      Left            =   1050
      TabIndex        =   28
      Text            =   "1"
      Top             =   840
      Width           =   555
   End
   Begin VB.TextBox txtHiValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   6
      Left            =   1650
      TabIndex        =   27
      Text            =   "1"
      Top             =   825
      Width           =   555
   End
   Begin VB.TextBox txtHiValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   5
      Left            =   2235
      TabIndex        =   26
      Text            =   "1"
      Top             =   825
      Width           =   555
   End
   Begin VB.TextBox txtHiValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   4
      Left            =   2835
      TabIndex        =   25
      Text            =   "1"
      Top             =   825
      Width           =   555
   End
   Begin VB.TextBox txtHiValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   3
      Left            =   3420
      TabIndex        =   24
      Text            =   "1"
      Top             =   825
      Width           =   555
   End
   Begin VB.TextBox txtHiValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   2
      Left            =   4020
      TabIndex        =   23
      Text            =   "1"
      Top             =   825
      Width           =   555
   End
   Begin VB.TextBox txtHiValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   1
      Left            =   4605
      TabIndex        =   22
      Text            =   "1"
      Top             =   825
      Width           =   555
   End
   Begin VB.TextBox txtLoValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   0
      Left            =   5205
      TabIndex        =   21
      Text            =   "1"
      Top             =   1320
      Width           =   555
   End
   Begin VB.TextBox txtHiValue 
      Enabled         =   0   'False
      Height          =   300
      Index           =   0
      Left            =   5205
      TabIndex        =   20
      Text            =   "1"
      Top             =   825
      Width           =   555
   End
   Begin VB.CheckBox chkBitEnable 
      Height          =   255
      Index           =   0
      Left            =   5205
      TabIndex        =   9
      Top             =   435
      Width           =   255
   End
   Begin VB.CheckBox chkBitEnable 
      Height          =   255
      Index           =   1
      Left            =   4605
      TabIndex        =   8
      Top             =   435
      Width           =   255
   End
   Begin VB.CheckBox chkBitEnable 
      Height          =   255
      Index           =   2
      Left            =   4020
      TabIndex        =   7
      Top             =   435
      Width           =   255
   End
   Begin VB.CheckBox chkBitEnable 
      Height          =   255
      Index           =   3
      Left            =   3420
      TabIndex        =   6
      Top             =   435
      Width           =   255
   End
   Begin VB.CheckBox chkBitEnable 
      Height          =   255
      Index           =   4
      Left            =   2835
      TabIndex        =   5
      Top             =   435
      Width           =   255
   End
   Begin VB.CheckBox chkBitEnable 
      Height          =   255
      Index           =   5
      Left            =   2235
      TabIndex        =   4
      Top             =   435
      Width           =   255
   End
   Begin VB.CheckBox chkBitEnable 
      Height          =   255
      Index           =   6
      Left            =   1650
      TabIndex        =   3
      Top             =   435
      Width           =   255
   End
   Begin VB.CheckBox chkBitEnable 
      Height          =   255
      Index           =   7
      Left            =   1050
      TabIndex        =   2
      Top             =   435
      Width           =   255
   End
   Begin VB.CommandButton cmdPatternOK 
      Caption         =   "&OK"
      Height          =   375
      Left            =   6015
      TabIndex        =   1
      Top             =   525
      Width           =   1095
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "&Cancel"
      Height          =   375
      Left            =   6015
      TabIndex        =   0
      Top             =   1245
      Width           =   1095
   End
   Begin VB.Label Label4 
      Alignment       =   1  'Right Justify
      Caption         =   "Lo No. :"
      Height          =   195
      Left            =   120
      TabIndex        =   37
      Top             =   1350
      Width           =   780
   End
   Begin VB.Label Label3 
      Alignment       =   1  'Right Justify
      Caption         =   "Hi No. :"
      Height          =   195
      Left            =   120
      TabIndex        =   36
      Top             =   870
      Width           =   780
   End
   Begin VB.Label Label1 
      Caption         =   "0"
      Height          =   255
      Index           =   0
      Left            =   5235
      TabIndex        =   19
      Top             =   135
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "1"
      Height          =   255
      Index           =   1
      Left            =   4635
      TabIndex        =   18
      Top             =   135
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "2"
      Height          =   255
      Index           =   2
      Left            =   4050
      TabIndex        =   17
      Top             =   135
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "3"
      Height          =   255
      Index           =   3
      Left            =   3465
      TabIndex        =   16
      Top             =   135
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "4"
      Height          =   255
      Index           =   4
      Left            =   2865
      TabIndex        =   15
      Top             =   135
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "5"
      Height          =   255
      Index           =   5
      Left            =   2280
      TabIndex        =   14
      Top             =   135
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "6"
      Height          =   255
      Index           =   6
      Left            =   1680
      TabIndex        =   13
      Top             =   135
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "7"
      Height          =   255
      Index           =   7
      Left            =   1095
      TabIndex        =   12
      Top             =   135
      Width           =   255
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      Caption         =   "Bit :"
      Height          =   195
      Left            =   405
      TabIndex        =   11
      Top             =   135
      Width           =   495
   End
   Begin VB.Label Label5 
      Alignment       =   1  'Right Justify
      Caption         =   "Enabled :"
      Height          =   195
      Left            =   120
      TabIndex        =   10
      Top             =   465
      Width           =   780
   End
End
Attribute VB_Name = "frmFilter"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public EnableMask As Integer
Dim HiValue(0 To 7) As Long
Dim LoValue(0 To 7) As Long

Public bCancel As Boolean

Private Sub chkBitEnable_Click(Index As Integer)
   If chkBitEnable(Index).value = 1 Then
      txtHiValue(Index).Enabled = True
      txtLoValue(Index).Enabled = True
      Select Case Index
      Case 0
         EnableMask = EnableMask Or &H1
      Case 1
         EnableMask = EnableMask Or &H2
      Case 2
         EnableMask = EnableMask Or &H4
      Case 3
         EnableMask = EnableMask Or &H8
      Case 4
         EnableMask = EnableMask Or &H10
      Case 5
         EnableMask = EnableMask Or &H20
      Case 6
         EnableMask = EnableMask Or &H40
      Case 7
         EnableMask = EnableMask Or &H80
      End Select
   Else
      txtHiValue(Index).Enabled = False
      txtLoValue(Index).Enabled = False
      Select Case Index
      Case 0
         EnableMask = EnableMask And &HFE
      Case 1
         EnableMask = EnableMask And &HFD
      Case 2
         EnableMask = EnableMask And &HFB
      Case 3
         EnableMask = EnableMask And &HF7
      Case 4
         EnableMask = EnableMask And &HEF
      Case 5
         EnableMask = EnableMask And &HDF
      Case 6
         EnableMask = EnableMask And &HBF
      Case 7
         EnableMask = EnableMask And &H7F
      End Select
   End If
End Sub

Private Sub cmdCancel_Click()
   bCancel = True
   Me.Hide
End Sub

Private Sub cmdPatternOK_Click()
   bCancel = False
   Me.Hide
End Sub

Private Sub Form_Load()
   Dim i As Integer

   EnableMask = 0
   For i = 0 To 7
      HiValue(i) = 0
      LoValue(i) = 0
   Next i
End Sub

Private Sub txtHiValue_Change(Index As Integer)
   HiValue(Index) = Val(txtHiValue(Index).Text)
End Sub

Private Sub txtLoValue_Change(Index As Integer)
   LoValue(Index) = Val(txtLoValue(Index).Text)
End Sub

⌨️ 快捷键说明

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