📄 fominpad.frm
字号:
VERSION 4.00
Begin VB.Form fominpadds
BorderStyle = 3 'Fixed Dialog
Caption = "InputSourceAdds"
ClientHeight = 3405
ClientLeft = 1560
ClientTop = 1035
ClientWidth = 6165
Height = 3810
Left = 1500
LinkTopic = "Form2"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 3405
ScaleWidth = 6165
ShowInTaskbar = 0 'False
Top = 690
Width = 6285
Begin VB.CommandButton cmdnext
Caption = "下一台"
Enabled = 0 'False
BeginProperty Font
name = "宋体"
charset = 1
weight = 400
size = 10.5
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 375
Left = 4320
TabIndex = 8
Top = 1440
Width = 855
End
Begin VB.CommandButton cmdpre
Caption = "上一台"
Enabled = 0 'False
BeginProperty Font
name = "宋体"
charset = 1
weight = 400
size = 10.5
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 375
Left = 3480
TabIndex = 7
Top = 1440
Width = 855
End
Begin VB.Frame Frame1
Caption = "待测仪器"
BeginProperty Font
name = "宋体"
charset = 1
weight = 400
size = 10.5
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 1815
Left = 240
TabIndex = 4
Top = 360
Width = 2415
Begin VB.TextBox txtnmb
Enabled = 0 'False
Height = 285
Left = 1560
TabIndex = 10
Top = 1290
Width = 615
End
Begin VB.OptionButton optsometest
Caption = " 多台测试"
BeginProperty Font
name = "宋体"
charset = 1
weight = 400
size = 10.5
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 6
Top = 960
Width = 1695
End
Begin VB.OptionButton optonetest
Caption = " 单台测试"
BeginProperty Font
name = "宋体"
charset = 1
weight = 400
size = 10.5
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 5
Top = 480
Value = -1 'True
Width = 1695
End
Begin VB.Label lbltai
Caption = "台数:"
Enabled = 0 'False
BeginProperty Font
name = "宋体"
charset = 1
weight = 400
size = 10.5
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Left = 840
TabIndex = 9
Top = 1320
Width = 615
End
End
Begin VB.CommandButton cmdcancle
Cancel = -1 'True
Caption = "退 出"
BeginProperty Font
name = "宋体"
charset = 1
weight = 400
size = 10.5
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 375
Left = 3960
TabIndex = 3
Top = 2520
Width = 1215
End
Begin VB.CommandButton cmdok
Caption = "确 定"
Default = -1 'True
BeginProperty Font
name = "宋体"
charset = 1
weight = 400
size = 10.5
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 375
Left = 960
TabIndex = 2
Top = 2520
Width = 1335
End
Begin VB.TextBox txtadds
Alignment = 2 'Center
Height = 285
Left = 4800
TabIndex = 1
Top = 795
Width = 975
End
Begin VB.Label lbladds
AutoSize = -1 'True
Caption = "请输入源地址(1):"
BeginProperty Font
name = "宋体"
charset = 1
weight = 400
size = 10.5
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 210
Left = 3000
TabIndex = 0
Top = 840
Width = 1785
End
End
Attribute VB_Name = "fominpadds"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Public n As Integer
Private Sub cmdcancle_Click()
Unload fominpadds
End Sub
Private Sub cmdnext_Click()
cmdpre.Enabled = True
If n < Number Then
n = n + 1
lbladds.Caption = "请输入源地址(" & n & "):"
Else
cmdnext.Enabled = False
' txtadds.Enabled = False
End If
End Sub
Private Sub cmdok_Click()
Dim Addsflag, t As Integer
For t = 1 To Number
If SOURCEADDS(t) = 0 Then
Addsflag = 1
End If
Next t
If Addsflag = 1 Then
Addsflag = 0
Exit Sub
End If
mdifomtest.mnuchdcv.Enabled = True
mdifomtest.mnuchohm.Enabled = True
mdifomtest.mnuchacv.Enabled = True
mdifomtest.mnuchdci.Enabled = True
mdifomtest.mnumsdcv.Enabled = True
mdifomtest.mnumsohm.Enabled = True
mdifomtest.mnumsacv.Enabled = True
mdifomtest.mnumsdci.Enabled = True
mdifomtest.mnumsaci.Enabled = True
mdifomtest.mnuchinpadds.Visible = False
mdifomtest.mnumsinpadds.Visible = False
'mdifomtest.mnusave.Enabled = True
'mdifomtest.imgsave.Enabled = True
mdifomtest.picstatue.Cls
mdifomtest.picstatue.Print "现在可以开始进行测试了!"
Unload fominpadds
'Load fomcheck
End Sub
Private Sub cmdpre_Click()
cmdnext.Enabled = True
If n <= Number And n > 1 Then
n = n - 1
lbladds.Caption = "请输入源地址(" & n & "):"
Else
cmdpre.Enabled = False
'txtadds.Enabled = False
End If
End Sub
Private Sub Form_Load()
n = 1
cmdpre.Enabled = False
cmdnext.Enabled = False
End Sub
Private Sub optonetest_Click()
lbltai.Enabled = False
txtnmb.Enabled = False
cmdpre.Enabled = False
cmdnext.Enabled = False
lbladds.Enabled = True
txtadds.Enabled = True
End Sub
Private Sub optsometest_Click()
lbltai.Enabled = True
txtnmb.Enabled = True
cmdpre.Enabled = False
cmdnext.Enabled = False
lbladds.Enabled = False
txtadds.Enabled = False
End Sub
Private Sub txtadds_Change()
'On Error GoTo errorhandle
' SOURCEADDS(n) = CInt(txtadds.Text)
'errorhandle:
' If Err.Number = 13 Then
' addsnote.Show 1
' End If
' Exit Sub
If IsNumeric(txtadds.Text) = True Then
If CInt(txtadds.Text) <= 31 Then
SOURCEADDS(n) = CInt(txtadds.Text)
Else
MsgBox "请输入正确的地址(1-31)!", vbOKOnly + vbCritical, "Error Address"
End If
ElseIf txtadds.Text <> "" Then
MsgBox "请输入正确的地址(1-31)!", vbOKOnly + vbCritical, "Error Address"
End If
End Sub
Private Sub txtnmb_Change()
'On Error GoTo errorhandle
' Number = CInt(txtnmb.Text)
' If Number < 2 Or Number > 10 Then
' nmbnote.Show 1
' Else
' 'cmdpre.Enabled = True
' cmdnext.Enabled = True
' lbladds.Enabled = True
' txtadds.Enabled = True
' End If'
'errorhandle:
' If Err.Number = 13 Then
' nmbnote.Show 1
' End If
' Exit Sub
If IsNumeric(txtnmb.Text) = True Then
If CInt(txtnmb.Text) >= 2 And CInt(txtnmb.Text) <= 10 Then
Number = CInt(txtnmb.Text)
cmdnext.Enabled = True
lbladds.Enabled = True
txtadds.Enabled = True
Else
MsgBox "请重新输入被检仪器台数(2-10)!", vbOKOnly + vbCritical, "Error Address"
fominpadds.cmdpre.Enabled = False
fominpadds.cmdnext.Enabled = False
fominpadds.lbladds.Enabled = False
fominpadds.txtadds.Enabled = False
End If
ElseIf txtnmb.Text <> "" Then
MsgBox "请重新输入被检仪器台数(2-10)!", vbOKOnly + vbCritical, "Error Address"
fominpadds.cmdpre.Enabled = False
fominpadds.cmdnext.Enabled = False
fominpadds.lbladds.Enabled = False
fominpadds.txtadds.Enabled = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -