frmtesthead.frm
来自「电梯检测系统是对电梯性能进行检测的系统。是一个用来学习的程序。」· FRM 代码 · 共 760 行 · 第 1/2 页
FRM
760 行
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = -74280
TabIndex = 17
Top = 2160
Width = 1215
End
Begin VB.Label Label15
Appearance = 0 'Flat
BackColor = &H8000000B&
Caption = "AC200V:"
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = -74280
TabIndex = 16
Top = 1320
Width = 1215
End
Begin VB.Label Label8
BackColor = &H8000000B&
Caption = "V"
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = -69960
TabIndex = 12
Top = 2880
Width = 1095
End
Begin VB.Label Label7
BackColor = &H8000000B&
Caption = "V"
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = -69960
TabIndex = 11
Top = 2040
Width = 1095
End
Begin VB.Label Label6
BackColor = &H8000000B&
Caption = "V"
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = -69960
TabIndex = 10
Top = 1320
Width = 1095
End
Begin VB.Label Label5
BackColor = &H8000000B&
Caption = "AC24V:"
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = -74160
TabIndex = 9
Top = 3000
Width = 1095
End
Begin VB.Label Label4
BackColor = &H8000000B&
Caption = "AC110V:"
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = -74160
TabIndex = 8
Top = 2160
Width = 1215
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H8000000B&
Caption = "AC200V:"
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = -74160
TabIndex = 7
Top = 1320
Width = 1215
End
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Function Test Info"
BeginProperty Font
Name = "Arial"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 120
TabIndex = 0
Top = 120
Width = 2130
End
Begin VB.Line Line1
BorderColor = &H8000000C&
BorderWidth = 2
X1 = 120
X2 = 7200
Y1 = 600
Y2 = 600
End
End
Attribute VB_Name = "FrmTestHead"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
End Sub
Private Sub CmdNo_Click()
Unload Me
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "You can't be test!"
Do Until DefMsgComp
DoEvents
Loop
FillComp = True
End Sub
Private Sub CmdYes_Click()
On Error GoTo ClickErr
Dim i As Integer
If Trim$(TextAc(0)) = "" Or IsNumeric(TextAc(0)) = False Then
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "AC200V voltage can't be null And must be numeric!"
Do Until DefMsgComp
DoEvents
Loop
Exit Sub
End If
If Not (CSng(Trim$(TextAc(0))) >= 190 And CSng(Trim$(TextAc(0))) <= 210) Then
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "the value of AC200V voltage must be in 190-210V!"
Do Until DefMsgComp
DoEvents
Loop
Exit Sub
End If
If Trim$(TextAc(1)) = "" Or IsNumeric(TextAc(1)) = False Then
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "AC110V voltage can't be null And must be numeric!"
Do Until DefMsgComp
DoEvents
Loop
Exit Sub
End If
If Not (CSng(Trim$(TextAc(1))) >= 100 And CSng(Trim$(TextAc(1))) <= 120) Then
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "the value of AC110V voltage must be in 100-120V!"
Do Until DefMsgComp
DoEvents
Loop
Exit Sub
End If
If Trim$(TextAc(2)) = "" Or IsNumeric(TextAc(2)) = False Then
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "AC24V voltage can't be null And must be numeric!"
Do Until DefMsgComp
DoEvents
Loop
Exit Sub
End If
If Not (CSng(Trim$(TextAc(2))) >= 21.6 And CSng(Trim$(TextAc(2))) <= 26.4) Then
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "the value of AC24V voltage must be in 21.6-26.4V!"
Do Until DefMsgComp
DoEvents
Loop
Exit Sub
End If
If Trim$(TextAcM(0)) = "" Or IsNumeric(TextAcM(0)) = False Then
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "AC200V MOhm can't be null And must be numeric!"
Do Until DefMsgComp
DoEvents
Loop
Exit Sub
End If
If Trim$(TextAcM(1)) = "" Or IsNumeric(TextAcM(1)) = False Then
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "AC110V MOhm can't be null And must be numeric!"
Do Until DefMsgComp
DoEvents
Loop
Exit Sub
End If
If Trim$(TextAcM(2)) = "" Or IsNumeric(TextAcM(2)) = False Then
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = "AC24V MOhm can't be null And must be numeric!"
Do Until DefMsgComp
DoEvents
Loop
Exit Sub
End If
'====开始保存文件
Open App.Path & "\ResultFiles\" & TempFileName & "func.txt" For Append As #1
Print #1, "------------------------------------------------------------"
Print #1, "Measure Voltage"
Print #1, "AC200V:" & Trim$(TextAc(0)) & "Mohm"
Print #1, "AC110V:" & Trim$(TextAc(1)) & "Mohm"
Print #1, "AC24V:" & Trim$(TextAc(2)) & "Mohm"
Print #1, "------------------------------------------------------------"
Print #1, "MOhm Insolation Measurement Result"
Print #1, "AC200V:" & Trim$(TextAcM(0)) & "V"
Print #1, "AC110V:" & Trim$(TextAcM(1)) & "V"
Print #1, "AC24V:" & Trim$(TextAcM(2)) & "V"
Print #1, "------------------------------------------------------------"
Print #1, "Visual Inspection"
If Check1.value = 1 Then
Print #1, "There must not be transformation,irregular design or scratches on the surface: YES"
Else
Print #1, "There must not be transformation,irregular design or scratches on the surface: NO"
End If
If Check1.value = 1 Then
Print #1, "Control Panel Door,Interphone Door Can be smoothly opened and shut. Moreover,make sure the door is lockable when it is closed.: YES"
Else
Print #1, "Control Panel Door,Interphone Door Can be smoothly opened and shut. Moreover,make sure the door is lockable when it is closed.: NO"
End If
Close #1
FillComp = True
FillSucc = True
Unload Me
Exit Sub
ClickErr:
Unload Me
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = Error$
Do Until DefMsgComp
DoEvents
Loop
Resume
On Error Resume Next
Close #1
End Sub
Private Sub Form_Load()
On Error GoTo LoadErr
TextDate = Format$(Now, "MM-DD-YYYY HH:MM")
TextVersion = "V1.0"
TextDate = TextDate
FillComp = False
FillSucc = False
Exit Sub
LoadErr:
SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
DefMsgBox.Text1 = Error$
Do Until DefMsgComp
DoEvents
Loop
End Sub
Private Sub TextAc_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{TAB}"
End If
End Sub
Private Sub TextAcM_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{TAB}"
End If
End Sub
Private Sub TextID_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{TAB}"
End If
End Sub
Private Sub TextWO_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{TAB}"
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?