📄 frmdutsignals.frm
字号:
Left = 120
Picture = "frmDUTSignals.frx":1504
Top = 3480
Visible = 0 'False
Width = 240
End
Begin VB.Label lblDUT2Signals
Alignment = 2 'Center
Caption = "DUT2"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1440
TabIndex = 9
Top = 360
Width = 975
End
Begin VB.Label lblDUT1Signals
Alignment = 2 'Center
Caption = "DUT1"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 3
Top = 360
Width = 975
End
End
Attribute VB_Name = "frmDUTSignals"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private IsUpdating As Boolean
Public Sub RefreshControls()
'Set the IsUpdating flag
IsUpdating = True
'Update the controls
chkAutoFUDDUT1.value = Abs(CInt(EvalBd.AutoFUD_DUT1))
chkAutoFUDDUT2.value = Abs(CInt(EvalBd.AutoFUD_DUT2))
'Clear the IsUpdating flag
IsUpdating = False
End Sub
Private Sub chkAutoFUDDUT1_Click()
'If the form isn't being updated then set the bit in the registermap
If Not IsUpdating Then
EvalBd.AutoFUD_DUT1 = CBool(chkAutoFUDDUT1.value)
End If
End Sub
Private Sub chkAutoFUDDUT2_Click()
'If the form isn't being updated then set the bit in the registermap
If Not IsUpdating Then
EvalBd.AutoFUD_DUT2 = CBool(chkAutoFUDDUT2.value)
End If
End Sub
Private Sub chkLock_Click(Index As Integer)
lblLocked(Index).Visible = CBool(chkLock(Index).value)
End Sub
Private Sub cmdFUD_Click(Index As Integer)
If chkLock(1).value = 1 Then
'FUD both Duts if clicked if buttons are locked
EvalBd.FUD_DUT1 = abvLow
EvalBd.FUD_DUT2 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff1
EvalBd.FUD_DUT1 = abvHigh
EvalBd.FUD_DUT2 = abvHigh
EvalBd.WriteEvbBuffVal evb59Buff1
EvalBd.FUD_DUT1 = abvLow
EvalBd.FUD_DUT2 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff1
Else
If Index = 0 Then
'FUD Dut 1 if clicked
EvalBd.FUD_DUT1 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff1
EvalBd.FUD_DUT1 = abvHigh
EvalBd.WriteEvbBuffVal evb59Buff1
EvalBd.FUD_DUT1 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff1
Else
'FUD Dut 2 if clicked
EvalBd.FUD_DUT2 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff1
EvalBd.FUD_DUT2 = abvHigh
EvalBd.WriteEvbBuffVal evb59Buff1
EvalBd.FUD_DUT2 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff1
End If
End If
End Sub
Private Sub cmdIOReset_Click(Index As Integer)
If chkLock(2).value Then
'If the buttons are locked then do both duts
EvalBd.IOSync_DUT1 = abvLow
EvalBd.IOSync_DUT2 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff2
EvalBd.IOSync_DUT1 = abvHigh
EvalBd.IOSync_DUT2 = abvHigh
EvalBd.WriteEvbBuffVal evb59Buff2
EvalBd.IOSync_DUT1 = abvLow
EvalBd.IOSync_DUT2 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff2
Else
'Otherwize do the appropriate one
If Index = 0 Then
EvalBd.IOSync_DUT1 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff2
EvalBd.IOSync_DUT1 = abvHigh
EvalBd.WriteEvbBuffVal evb59Buff2
EvalBd.IOSync_DUT1 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff2
Else
EvalBd.IOSync_DUT2 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff2
EvalBd.IOSync_DUT2 = abvHigh
EvalBd.WriteEvbBuffVal evb59Buff2
EvalBd.IOSync_DUT2 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff2
End If
End If
End Sub
Private Sub cmdReset_Click(Index As Integer)
If chkLock(0).value = 1 Then
EvalBd.ResetDUT 0
Else
EvalBd.ResetDUT Index + 1
End If
End Sub
Private Sub Form_Activate()
'Set back color of title bar to the system color for
'an active titlebar
pbxTitleBar.BackColor = &H80000002 'Active Titlebar
lblCaption.ForeColor = &H80000009 'Active TitlebarText
End Sub
Private Sub Form_Deactivate()
'Set back color of title bar to the system color for
'an inactive titlebar
pbxTitleBar.BackColor = &H80000003 'Inactive Titlebar
lblCaption.ForeColor = &H80000013 'Inactive TitlebarText
End Sub
Private Sub Form_Load()
'Make this form modeless
Call MakeFormModeless(Me, mdiMain.hWnd)
End Sub
Private Sub imgFormCloseButton_Click()
Me.Hide
End Sub
Private Sub imgFormCloseButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
'Show the pressed state
imgFormCloseButton.Tag = 1
imgFormCloseButton.Picture = imgFormCloseBtnBfr(1).Picture
End If
End Sub
Private Sub imgFormCloseButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
'Show the pressed state
imgFormCloseButton.Tag = 1
imgFormCloseButton.Picture = imgFormCloseBtnBfr(1).Picture
Else
'Show the unpressed state
imgFormCloseButton.Tag = 0
imgFormCloseButton.Picture = imgFormCloseBtnBfr(0).Picture
End If
End Sub
Private Sub imgFormCloseButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
'Show the unpressed state
imgFormCloseButton.Tag = 0
imgFormCloseButton.Picture = imgFormCloseBtnBfr(0).Picture
End If
End Sub
Private Sub imgShade_Click()
'Check the form state if
If imgShade.Tag = "0" Or imgShade.Tag = "2" Then
imgShade.Tag = "1"
imgShade.Picture = imgShadeBfr(1).Picture
Me.Height = 345
Else
imgShade.Tag = "0"
imgShade.Picture = imgShadeBfr(0).Picture
Me.Height = 3345
End If
End Sub
Private Sub imgShade_DblClick()
imgShade_Click
End Sub
Private Sub imgShade_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
'Select the proper button pressed picture
If imgShade.Tag = "0" Then
imgShade.Tag = "2"
Else
imgShade.Tag = "3"
End If
'Draw the picture
imgShade.Picture = imgShadeBfr(imgShade.Tag).Picture
End If
End Sub
Private Sub imgShade_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
'Select the proper button pressed picture
If imgShade.Tag = "2" Then
imgShade.Tag = "0"
Else
imgShade.Tag = "1"
End If
'Draw the picture
imgShade.Picture = imgShadeBfr(imgShade.Tag).Picture
End If
End Sub
Private Sub lblCaption_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
pbxTitleBar_MouseDown Button, Shift, X, Y
End Sub
Private Sub pbxTitleBar_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Move the form based on the user clicking
If Button = 1 Then
ReleaseCapture
SendMessage Me.hWnd, &HA1, 2, 0&
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -