?? dialog.frm
字號:
VERSION 5.00
Begin VB.Form Dialog
BorderStyle = 3 'Fixed Dialog
Caption = "高級選項"
ClientHeight = 2940
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 4185
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2940
ScaleWidth = 4185
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Set_time
Height = 375
Left = 1680
TabIndex = 6
Text = "10"
Top = 1440
Width = 495
End
Begin VB.TextBox Set_Len
Height = 375
Left = 1680
TabIndex = 5
Text = "500"
Top = 840
Width = 495
End
Begin VB.OptionButton Option3
Caption = "運行"
Height = 375
Left = 840
TabIndex = 4
Top = 1440
Width = 735
End
Begin VB.OptionButton Option2
Caption = "采集"
Height = 375
Left = 840
TabIndex = 3
Top = 840
Width = 735
End
Begin VB.OptionButton Option1
Caption = "手動停止"
Height = 375
Left = 840
TabIndex = 2
Top = 240
Value = -1 'True
Width = 1335
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 2640
TabIndex = 1
Top = 2160
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "確定"
Height = 375
Left = 840
TabIndex = 0
Top = 2160
Width = 1215
End
Begin VB.Label Label2
Caption = "分鐘后停止"
Height = 255
Left = 2280
TabIndex = 8
Top = 1560
Width = 975
End
Begin VB.Label Label1
Caption = "幀后停止"
Height = 255
Left = 2280
TabIndex = 7
Top = 960
Width = 855
End
End
Attribute VB_Name = "Dialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
If Form1.Option_Num = 1 Then
Option1.Value = True
Set_Len.Enabled = False
Set_time.Enabled = False
ElseIf Form1.Option_Num = 2 Then
Option2.Value = True
Set_time.Enabled = False
Set_Len.Text = CStr(Form1.Option_Content)
ElseIf Form1.Option_Num = 3 Then
Option3.Value = True
Set_Len.Enabled = False
Set_time.Text = CStr(Form1.Option_Content)
End If
End Sub
Private Sub OKButton_Click()
If Option1.Value = True Then
Form1.Option_Num = 1
ElseIf Option2.Value = True Then
If CInt(Set_Len.Text) <= 0 Or CInt(Set_Len.Text) > 10000 Then
MsgBox "輸入的數(shù)據(jù)不合法,請正確輸入!"
Set_Len.SetFocus
GoTo fback
End If
Form1.Option_Num = 2
Form1.Option_Content = CInt(Set_Len.Text)
Else
If CInt(Set_time.Text) <= 0 Or CInt(Set_time.Text) > 10000 Then
MsgBox "輸入的數(shù)據(jù)不合法,請正確輸入!"
Set_time.SetFocus
GoTo fback
End If
Form1.Option_Num = 3
Form1.Option_Content = CInt(Set_time.Text)
End If
Unload Dialog
fback:
End Sub
Private Sub CancelButton_Click()
Unload Dialog
End Sub
Private Sub Option1_Click()
Set_time.Enabled = False
Set_Len.Enabled = False
End Sub
Private Sub Option2_Click()
Set_time.Enabled = False
Set_Len.Enabled = True
'Set_Len.SetFocus
End Sub
Private Sub Option3_Click()
Set_Len.Enabled = False
Set_time.Enabled = True
'Set_time.SetFocus
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -