📄 dio_form.frm
字号:
Style = 1 'Graphical
TabIndex = 9
Top = 5880
Width = 1695
End
Begin VB.CommandButton DO6_Command
BackColor = &H80000016&
Caption = "开关6[关]"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 8
Top = 5088
Width = 1695
End
Begin VB.CommandButton DO5_Command
BackColor = &H80000016&
Caption = "开关5[关]"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 7
Top = 4300
Width = 1695
End
Begin VB.CommandButton DO4_Command
BackColor = &H80000016&
Caption = "开关4[关]"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 6
Top = 3512
Width = 1695
End
Begin VB.CommandButton DO3_Command
BackColor = &H80000016&
Caption = "开关3[关]"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 5
Top = 2724
Width = 1695
End
Begin VB.CommandButton DO2_Command
BackColor = &H80000016&
Caption = "开关2[关]"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 4
Top = 1936
Width = 1695
End
Begin VB.CommandButton DO1_Command
BackColor = &H80000016&
Caption = "开关1[关]"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 3
Top = 1148
Width = 1695
End
Begin VB.CommandButton DO0_Command
BackColor = &H80000016&
Caption = "开关0[关]"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 2
Top = 360
Width = 1695
End
End
Begin VB.Menu new
Caption = "文件操作"
Begin VB.Menu Open_SC
Caption = "打开数采系统"
End
Begin VB.Menu closesystem
Caption = "关闭本系统"
End
Begin VB.Menu exit
Caption = "退出应用程序"
End
End
Begin VB.Menu WindowsListD
Caption = "窗口列表"
WindowList = -1 'True
End
End
Attribute VB_Name = "DIO_Form"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim hDevice As Long
Dim Para_DI As USB2013_PARA_DI
Dim Para_DO As USB2013_PARA_DO
Dim buffer As String
Dim inCome As Boolean, outCome As Boolean
Dim c(0 To 100) As String, O(0 To 100) As String, i As Integer
Private Sub DO0_Command_Click() '0号开关控制
Dim bStatus As Boolean
If (Para_DO.DO0) = 1 Then
DO0_Command.Caption = O(0) & "[关]"
DO0_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO0 = 0
Else
DO0_Command.Caption = O(0) & "[开]"
DO0_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO0 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO1_Command_Click() '1号开关控制
Dim bStatus As Boolean
If (Para_DO.DO1) = 1 Then
DO1_Command.Caption = O(1) & "[关]"
DO1_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO1 = 0
Else
DO1_Command.Caption = O(1) & "[开]"
DO1_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO1 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO2_Command_Click() '2号开关控制
Dim bStatus As Boolean
If (Para_DO.DO2) = 1 Then
DO2_Command.Caption = O(2) & "[关]"
DO2_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO2 = 0
Else
DO2_Command.Caption = O(2) & "[开]"
DO2_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO2 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO3_Command_Click() '3号开关控制
Dim bStatus As Boolean
If (Para_DO.DO3) = 1 Then
DO3_Command.Caption = O(3) & "[关]"
DO3_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO3 = 0
Else
DO3_Command.Caption = O(3) & "[开]"
DO3_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO3 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO4_Command_Click() '4号开关控制
Dim bStatus As Boolean
If (Para_DO.DO4) = 1 Then
DO4_Command.Caption = O(4) & "[关]"
DO4_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO4 = 0
Else
DO4_Command.Caption = O(4) & "[开]"
DO4_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO4 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO5_Command_Click() '5号开关控制
Dim bStatus As Boolean
If (Para_DO.DO5) = 1 Then
DO5_Command.Caption = O(5) & "[关]"
DO5_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO5 = 0
Else
DO5_Command.Caption = O(5) & "[开]"
DO5_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO5 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO6_Command_Click() '6号开关控制
Dim bStatus As Boolean
If (Para_DO.DO6) = 1 Then
DO6_Command.Caption = O(6) & "[关]"
DO6_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO6 = 0
Else
DO6_Command.Caption = O(6) & "[开]"
DO6_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO6 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO7_Command_Click() '7号开关控制
Dim bStatus As Boolean
If (Para_DO.DO7) = 1 Then
DO7_Command.Caption = O(7) & "[关]"
DO7_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO7 = 0
Else
DO7_Command.Caption = O(7) & "[开]"
DO7_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO7 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO8_Command_Click() '8号开关控制
Dim bStatus As Boolean
If (Para_DO.DO8) = 1 Then
DO8_Command.Caption = O(8) & "[关]"
DO8_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO8 = 0
Else
DO8_Command.Caption = O(8) & "[开]"
DO8_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO8 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO9_Command_Click() '9号开关控制
Dim bStatus As Boolean
If (Para_DO.DO9) = 1 Then
DO9_Command.Caption = O(9) & "[关]"
DO9_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO9 = 0
Else
DO9_Command.Caption = O(9) & "[开]"
DO9_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO9 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO10_Command_Click() '10号开关控制
Dim bStatus As Boolean
If (Para_DO.DO10) = 1 Then
DO10_Command.Caption = O(10) & "[关]"
DO10_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO10 = 0
Else
DO10_Command.Caption = O(10) & "[开]"
DO10_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO10 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO11_Command_Click() '11号开关控制
Dim bStatus As Boolean
If (Para_DO.DO11) = 1 Then
DO11_Command.Caption = O(11) & "[关]"
DO11_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO11 = 0
Else
DO11_Command.Caption = O(11) & "[开]"
DO11_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO11 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO12_Command_Click() '12号开关控制
Dim bStatus As Boolean
If (Para_DO.DO12) = 1 Then
DO12_Command.Caption = O(12) & "[关]"
DO12_Command.BackColor = RGB(192, 192, 192)
Para_DO.DO12 = 0
Else
DO12_Command.Caption = O(12) & "[开]"
DO12_Command.BackColor = RGB(0, 255, 255)
Para_DO.DO12 = 1
End If
bStatus = USB2013_SetDeviceDO(hDevice, Para_DO)
End Sub
Private Sub DO13_Command_Click() '13号开关控制
Dim bStatus As Boolean
If (Para_DO.DO13) = 1 Then
DO13_Command.Caption = O(13) & "[关]"
DO13_Command.BackColor = RGB(192, 192, 192)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -