?? 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 + -