SSPC-Tester/Driver/急停报警相关资料/PCI2312 Samples/VB/Simple/DIO/DIO.frm

714 lines
23 KiB
Plaintext
Raw Normal View History

VERSION 5.00
Begin VB.Form DIO
BorderStyle = 1 'Fixed Single
Caption = "PCI2312_DIO"
ClientHeight = 6240
ClientLeft = 45
ClientTop = 435
ClientWidth = 11805
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6240
ScaleWidth = 11805
StartUpPosition = 3 '<27><><EFBFBD><EFBFBD>ȱʡ
Begin VB.CommandButton Command_ReadDI
Caption = "<22><>ȡDI"
Height = 375
Left = 5400
TabIndex = 18
Top = 5280
Width = 1335
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>7"
Enabled = 0 'False
Height = 375
Index = 7
Left = 6960
Style = 1 'Graphical
TabIndex = 17
Top = 4320
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>6"
Enabled = 0 'False
Height = 375
Index = 6
Left = 6960
Style = 1 'Graphical
TabIndex = 16
Top = 3840
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>5"
Enabled = 0 'False
Height = 375
Index = 5
Left = 6960
Style = 1 'Graphical
TabIndex = 15
Top = 3360
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>4"
Enabled = 0 'False
Height = 375
Index = 4
Left = 6960
Style = 1 'Graphical
TabIndex = 14
Top = 2880
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>3"
Enabled = 0 'False
Height = 375
Index = 3
Left = 6960
Style = 1 'Graphical
TabIndex = 13
Top = 2400
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>2"
Enabled = 0 'False
Height = 375
Index = 2
Left = 6960
Style = 1 'Graphical
TabIndex = 12
Top = 1920
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>1"
Enabled = 0 'False
Height = 375
Index = 1
Left = 6960
Style = 1 'Graphical
TabIndex = 11
Top = 1440
Width = 1095
End
Begin VB.Frame Frame2
Caption = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬"
Height = 4335
Left = 6480
TabIndex = 9
Top = 600
Width = 4455
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>8"
Enabled = 0 'False
Height = 375
Index = 8
Left = 2520
Style = 1 'Graphical
TabIndex = 34
Top = 360
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>9"
Enabled = 0 'False
Height = 375
Index = 9
Left = 2520
Style = 1 'Graphical
TabIndex = 33
Top = 840
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>10"
Enabled = 0 'False
Height = 375
Index = 10
Left = 2520
Style = 1 'Graphical
TabIndex = 32
Top = 1320
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>11"
Enabled = 0 'False
Height = 375
Index = 11
Left = 2520
Style = 1 'Graphical
TabIndex = 31
Top = 1800
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>12"
Enabled = 0 'False
Height = 375
Index = 12
Left = 2520
Style = 1 'Graphical
TabIndex = 30
Top = 2280
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>13"
Enabled = 0 'False
Height = 375
Index = 13
Left = 2520
Style = 1 'Graphical
TabIndex = 29
Top = 2760
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>14"
Enabled = 0 'False
Height = 375
Index = 14
Left = 2520
Style = 1 'Graphical
TabIndex = 28
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>15"
Enabled = 0 'False
Height = 375
Index = 15
Left = 2520
Style = 1 'Graphical
TabIndex = 27
Top = 3720
Width = 1095
End
Begin VB.CommandButton Command_DI
Caption = "<22><><EFBFBD><EFBFBD>0"
Enabled = 0 'False
Height = 375
Index = 0
Left = 480
Style = 1 'Graphical
TabIndex = 10
Top = 360
Width = 1095
End
End
Begin VB.Frame Frame1
Caption = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Height = 4335
Left = 840
TabIndex = 0
Top = 600
Width = 4215
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>8[<5B><>]"
Height = 375
Index = 8
Left = 2400
Style = 1 'Graphical
TabIndex = 26
Top = 360
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>9[<5B><>]"
Height = 375
Index = 9
Left = 2400
Style = 1 'Graphical
TabIndex = 25
Top = 840
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>10[<5B><>]"
Height = 375
Index = 10
Left = 2400
Style = 1 'Graphical
TabIndex = 24
Top = 1320
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>11[<5B><>]"
Height = 375
Index = 11
Left = 2400
Style = 1 'Graphical
TabIndex = 23
Top = 1800
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>12[<5B><>]"
Height = 375
Index = 12
Left = 2400
Style = 1 'Graphical
TabIndex = 22
Top = 2280
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>13[<5B><>]"
Height = 375
Index = 13
Left = 2400
Style = 1 'Graphical
TabIndex = 21
Top = 2760
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>14[<5B><>]"
Height = 375
Index = 14
Left = 2400
Style = 1 'Graphical
TabIndex = 20
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>15[<5B><>]"
Height = 375
Index = 15
Left = 2400
Style = 1 'Graphical
TabIndex = 19
Top = 3720
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>7[<5B><>]"
Height = 375
Index = 7
Left = 360
Style = 1 'Graphical
TabIndex = 8
Top = 3720
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>6[<5B><>]"
Height = 375
Index = 6
Left = 360
Style = 1 'Graphical
TabIndex = 7
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>5[<5B><>]"
Height = 375
Index = 5
Left = 360
Style = 1 'Graphical
TabIndex = 6
Top = 2760
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>4[<5B><>]"
Height = 375
Index = 4
Left = 360
Style = 1 'Graphical
TabIndex = 5
Top = 2280
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>3[<5B><>]"
Height = 375
Index = 3
Left = 360
Style = 1 'Graphical
TabIndex = 4
Top = 1800
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>2[<5B><>]"
Height = 375
Index = 2
Left = 360
Style = 1 'Graphical
TabIndex = 3
Top = 1320
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>1[<5B><>]"
Height = 375
Index = 1
Left = 360
Style = 1 'Graphical
TabIndex = 2
Top = 840
Width = 1095
End
Begin VB.CommandButton Command_DO
Caption = "<22><><EFBFBD><EFBFBD>0[<5B><>]"
Height = 375
Index = 0
Left = 360
Style = 1 'Graphical
TabIndex = 1
Top = 360
Width = 1095
End
End
End
Attribute VB_Name = "DIO"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim bDISts(0 To 15) As Byte
Dim bDOSts(0 To 15) As Byte
Dim hDevice As Long
Dim DeviceLgcID As Integer
Private Sub Command_DO_Click(Index As Integer)
Select Case Index
Case 0:
If bDOSts(0) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(0) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(0) = 1
End If
Case 1:
If bDOSts(1) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(1) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(1) = 1
End If
Case 2:
If bDOSts(2) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(2) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(2) = 1
End If
Case 3:
If bDOSts(3) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(3) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(3) = 1
End If
Case 4:
If bDOSts(4) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(4) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(4) = 1
End If
Case 5:
If bDOSts(5) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(5) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(5) = 1
End If
Case 6:
If bDOSts(6) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(6) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(6) = 1
End If
Case 7:
If bDOSts(7) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(7) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(7) = 1
End If
Case 8:
If bDOSts(8) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(8) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(8) = 1
End If
Case 9:
If bDOSts(9) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(9) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(9) = 1
End If
Case 10:
If bDOSts(10) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(10) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(10) = 1
End If
Case 11:
If bDOSts(11) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(11) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(11) = 1
End If
Case 12:
If bDOSts(12) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(12) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(12) = 1
End If
Case 13:
If bDOSts(13) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(13) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(13) = 1
End If
Case 14:
If bDOSts(14) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(14) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(14) = 1
End If
Case 15:
If bDOSts(15) = 1 Then
Me.Command_DO(Index).BackColor = RGB(192, 192, 192)
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
bDOSts(15) = 0
Else
Me.Command_DO(Index).Caption = "<22><><EFBFBD><EFBFBD>" + CStr(Index) + "[<5B><>]"
Me.Command_DO(Index).BackColor = RGB(0, 255, 255)
bDOSts(15) = 1
End If
End Select
If PCI2312_SetDeviceDO(hDevice, bDOSts(0)) = False Then ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
MsgBox "PCI2312_SetDeviceDO Error..."
End If
End Sub
Private Sub Command_ReadDI_Click()
If PCI2312_GetDeviceDI(hDevice, bDISts(0)) = False Then ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
MsgBox "PCI2312_GetDeviceDI Error..."
End If
If bDISts(0) = 1 Then
Me.Command_DI(0).Caption = "<22><><EFBFBD><EFBFBD>0[<5B><>]"
Me.Command_DI(0).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(0).Caption = "<22><><EFBFBD><EFBFBD>0[<5B><>]"
Me.Command_DI(0).BackColor = RGB(192, 192, 192)
End If
If bDISts(1) = 1 Then
Me.Command_DI(1).Caption = "<22><><EFBFBD><EFBFBD>1[<5B><>]"
Me.Command_DI(1).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(1).Caption = "<22><><EFBFBD><EFBFBD>1[<5B><>]"
Me.Command_DI(1).BackColor = RGB(192, 192, 192)
End If
If bDISts(2) = 1 Then
Me.Command_DI(2).Caption = "<22><><EFBFBD><EFBFBD>2[<5B><>]"
Me.Command_DI(2).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(2).Caption = "<22><><EFBFBD><EFBFBD>2[<5B><>]"
Me.Command_DI(2).BackColor = RGB(192, 192, 192)
End If
If bDISts(3) = 1 Then
Me.Command_DI(3).Caption = "<22><><EFBFBD><EFBFBD>3[<5B><>]"
Me.Command_DI(3).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(3).Caption = "<22><><EFBFBD><EFBFBD>3[<5B><>]"
Me.Command_DI(3).BackColor = RGB(192, 192, 192)
End If
If bDISts(4) = 1 Then
Me.Command_DI(4).Caption = "<22><><EFBFBD><EFBFBD>4[<5B><>]"
Me.Command_DI(4).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(4).Caption = "<22><><EFBFBD><EFBFBD>4[<5B><>]"
Me.Command_DI(4).BackColor = RGB(192, 192, 192)
End If
If bDISts(5) = 1 Then
Me.Command_DI(5).Caption = "<22><><EFBFBD><EFBFBD>5[<5B><>]"
Me.Command_DI(5).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(5).Caption = "<22><><EFBFBD><EFBFBD>5[<5B><>]"
Me.Command_DI(5).BackColor = RGB(192, 192, 192)
End If
If bDISts(6) = 1 Then
Me.Command_DI(6).Caption = "<22><><EFBFBD><EFBFBD>6[<5B><>]"
Me.Command_DI(6).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(6).Caption = "<22><><EFBFBD><EFBFBD>6[<5B><>]"
Me.Command_DI(6).BackColor = RGB(192, 192, 192)
End If
If bDISts(7) = 1 Then
Me.Command_DI(7).Caption = "<22><><EFBFBD><EFBFBD>7[<5B><>]"
Me.Command_DI(7).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(7).Caption = "<22><><EFBFBD><EFBFBD>7[<5B><>]"
Me.Command_DI(7).BackColor = RGB(192, 192, 192)
End If
If bDISts(8) = 1 Then
Me.Command_DI(8).Caption = "<22><><EFBFBD><EFBFBD>8[<5B><>]"
Me.Command_DI(8).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(8).Caption = "<22><><EFBFBD><EFBFBD>8[<5B><>]"
Me.Command_DI(8).BackColor = RGB(192, 192, 192)
End If
If bDISts(9) = 1 Then
Me.Command_DI(9).Caption = "<22><><EFBFBD><EFBFBD>9[<5B><>]"
Me.Command_DI(9).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(9).Caption = "<22><><EFBFBD><EFBFBD>9[<5B><>]"
Me.Command_DI(9).BackColor = RGB(192, 192, 192)
End If
If bDISts(10) = 1 Then
Me.Command_DI(10).Caption = "<22><><EFBFBD><EFBFBD>10[<5B><>]"
Me.Command_DI(10).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(10).Caption = "<22><><EFBFBD><EFBFBD>10[<5B><>]"
Me.Command_DI(10).BackColor = RGB(192, 192, 192)
End If
If bDISts(11) = 1 Then
Me.Command_DI(11).Caption = "<22><><EFBFBD><EFBFBD>11[<5B><>]"
Me.Command_DI(11).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(11).Caption = "<22><><EFBFBD><EFBFBD>11[<5B><>]"
Me.Command_DI(11).BackColor = RGB(192, 192, 192)
End If
If bDISts(12) = 1 Then
Me.Command_DI(12).Caption = "<22><><EFBFBD><EFBFBD>12[<5B><>]"
Me.Command_DI(12).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(12).Caption = "<22><><EFBFBD><EFBFBD>12[<5B><>]"
Me.Command_DI(12).BackColor = RGB(192, 192, 192)
End If
If bDISts(13) = 1 Then
Me.Command_DI(13).Caption = "<22><><EFBFBD><EFBFBD>13[<5B><>]"
Me.Command_DI(13).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(13).Caption = "<22><><EFBFBD><EFBFBD>13[<5B><>]"
Me.Command_DI(13).BackColor = RGB(192, 192, 192)
End If
If bDISts(14) = 1 Then
Me.Command_DI(14).Caption = "<22><><EFBFBD><EFBFBD>14[<5B><>]"
Me.Command_DI(14).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(14).Caption = "<22><><EFBFBD><EFBFBD>14[<5B><>]"
Me.Command_DI(14).BackColor = RGB(192, 192, 192)
End If
If bDISts(15) = 1 Then
Me.Command_DI(15).Caption = "<22><><EFBFBD><EFBFBD>15[<5B><>]"
Me.Command_DI(15).BackColor = RGB(0, 255, 255)
Else
Me.Command_DI(15).Caption = "<22><><EFBFBD><EFBFBD>15[<5B><>]"
Me.Command_DI(15).BackColor = RGB(192, 192, 192)
End If
End Sub
Private Sub Form_Load()
DeviceLgcID = 0
hDevice = PCI2312_CreateDevice(DeviceLgcID)
If hDevice = INVALID_HANDLE_VALUE Then
MsgBox "PCI2312_CreateDevice Error..."
Exit Sub
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
If PCI2312_ReleaseDevice(hDevice) = False Then
MsgBox "PCI2312_ReleaseDevice Error..."
End If
End Sub