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

📄 frmstatus.frm

📁 16 relay output channels and 16 isolated digital input channels LED indicators to show activated
💻 FRM
📖 第 1 页 / 共 2 页
字号:
   Begin VB.CheckBox chkBitEnable 
      Height          =   255
      Index           =   0
      Left            =   4200
      TabIndex        =   2
      Top             =   540
      Width           =   255
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "&Cancel"
      Height          =   375
      Left            =   4680
      TabIndex        =   1
      Top             =   1200
      Width           =   1095
   End
   Begin VB.CommandButton cmdPatternOK 
      Caption         =   "&OK"
      Height          =   375
      Left            =   4680
      TabIndex        =   0
      Top             =   480
      Width           =   1095
   End
   Begin VB.Label Label5 
      Alignment       =   1  'Right Justify
      Caption         =   "Enabled :"
      Height          =   255
      Left            =   240
      TabIndex        =   45
      Top             =   540
      Width           =   1335
   End
   Begin VB.Label Label4 
      Alignment       =   1  'Right Justify
      Caption         =   "Falling Edge Trig. :"
      Height          =   255
      Left            =   240
      TabIndex        =   44
      Top             =   1515
      Width           =   1335
   End
   Begin VB.Label Label3 
      Alignment       =   1  'Right Justify
      Caption         =   "Rising Edge Trig. :"
      Height          =   255
      Left            =   240
      TabIndex        =   43
      Top             =   1035
      Width           =   1335
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      Caption         =   "Bit :"
      Height          =   255
      Left            =   1080
      TabIndex        =   42
      Top             =   240
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "7"
      Height          =   255
      Index           =   7
      Left            =   1695
      TabIndex        =   17
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "6"
      Height          =   255
      Index           =   6
      Left            =   2055
      TabIndex        =   16
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "5"
      Height          =   255
      Index           =   5
      Left            =   2415
      TabIndex        =   15
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "4"
      Height          =   255
      Index           =   4
      Left            =   2775
      TabIndex        =   14
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "3"
      Height          =   255
      Index           =   3
      Left            =   3135
      TabIndex        =   13
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "2"
      Height          =   255
      Index           =   2
      Left            =   3495
      TabIndex        =   12
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "1"
      Height          =   255
      Index           =   1
      Left            =   3855
      TabIndex        =   11
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "0"
      Height          =   255
      Index           =   0
      Left            =   4215
      TabIndex        =   10
      Top             =   240
      Width           =   255
   End
End
Attribute VB_Name = "frmStatus"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public EnableMask As Integer
Public RisingEdge As Integer
Public FallingEdge As Integer
Public bCancel As Boolean

Private Sub chkBitEnable_Click(Index As Integer)
   If chkBitEnable(Index).value = 1 Then
      framBitSetting(Index).Enabled = True
      chkRising(Index).Enabled = True
      chkFalling(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
      framBitSetting(Index).Enabled = False
      chkRising(Index).Enabled = False
      chkFalling(Index).Enabled = False
      chkRising(Index).value = 0
      chkFalling(Index).value = 0
      Select Case Index
      Case 0
         EnableMask = EnableMask And &HFE
         FallingEdge = FallingEdge And &HFE
         RisingEdge = RisingEdge And &HFE
      Case 1
         EnableMask = EnableMask And &HFD
         FallingEdge = FallingEdge And &HFD
         RisingEdge = RisingEdge And &HFD
      Case 2
         EnableMask = EnableMask And &HFB
         FallingEdge = FallingEdge And &HFB
         RisingEdge = RisingEdge And &HFB
      Case 3
         EnableMask = EnableMask And &HF7
         FallingEdge = FallingEdge And &HF7
         RisingEdge = RisingEdge And &HF7
      Case 4
         EnableMask = EnableMask And &HEF
         FallingEdge = FallingEdge And &HEF
         RisingEdge = RisingEdge And &HEF
      Case 5
         EnableMask = EnableMask And &HDF
         FallingEdge = FallingEdge And &HDF
         RisingEdge = RisingEdge And &HDF
      Case 6
         EnableMask = EnableMask And &HBF
         FallingEdge = FallingEdge And &HBF
         RisingEdge = RisingEdge And &HBF
      Case 7
         EnableMask = EnableMask And &H7F
         FallingEdge = FallingEdge And &H7F
         RisingEdge = RisingEdge And &H7F
      End Select
   End If
End Sub

Private Sub chkFalling_Click(Index As Integer)
   If chkFalling(Index).value = Checked Then
      Select Case Index
      Case 0
         FallingEdge = FallingEdge Or &H1
      Case 1
         FallingEdge = FallingEdge Or &H2
      Case 2
         FallingEdge = FallingEdge Or &H4
      Case 3
         FallingEdge = FallingEdge Or &H8
      Case 4
         FallingEdge = FallingEdge Or &H10
      Case 5
         FallingEdge = FallingEdge Or &H20
      Case 6
         FallingEdge = FallingEdge Or &H40
      Case 7
         FallingEdge = FallingEdge Or &H80
      End Select
   Else
      Select Case Index
      Case 0
         FallingEdge = FallingEdge And &HFE
      Case 1
         FallingEdge = FallingEdge And &HFD
      Case 2
         FallingEdge = FallingEdge And &HFB
      Case 3
         FallingEdge = FallingEdge And &HF7
      Case 4
         FallingEdge = FallingEdge And &HEF
      Case 5
         FallingEdge = FallingEdge And &HDF
      Case 6
         FallingEdge = FallingEdge And &HBF
      Case 7
         FallingEdge = FallingEdge And &H7F
      End Select
   End If
End Sub

Private Sub chkRising_Click(Index As Integer)
   If chkRising(Index).value = Checked Then
      Select Case Index
      Case 0
         RisingEdge = RisingEdge Or &H1
      Case 1
         RisingEdge = RisingEdge Or &H2
      Case 2
         RisingEdge = RisingEdge Or &H4
      Case 3
         RisingEdge = RisingEdge Or &H8
      Case 4
         RisingEdge = RisingEdge Or &H10
      Case 5
         RisingEdge = RisingEdge Or &H20
      Case 6
         RisingEdge = RisingEdge Or &H40
      Case 7
         RisingEdge = RisingEdge Or &H80
      End Select
   Else
      Select Case Index
      Case 0
         RisingEdge = RisingEdge And &HFE
      Case 1
         RisingEdge = RisingEdge And &HFD
      Case 2
         RisingEdge = RisingEdge And &HFB
      Case 3
         RisingEdge = RisingEdge And &HF7
      Case 4
         RisingEdge = RisingEdge And &HEF
      Case 5
         RisingEdge = RisingEdge And &HDF
      Case 6
         RisingEdge = RisingEdge And &HBF
      Case 7
         RisingEdge = RisingEdge 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()
   RisingEdge = 0
   FallingEdge = 0
   EnableMask = 0
End Sub

⌨️ 快捷键说明

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