📄 frmoption.frm
字号:
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmOption
BorderStyle = 3 'Fixed Dialog
Caption = "选项"
ClientHeight = 3300
ClientLeft = 45
ClientTop = 330
ClientWidth = 4800
Icon = "frmOption.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3300
ScaleWidth = 4800
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
WhatsThisButton = -1 'True
WhatsThisHelp = -1 'True
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
CausesValidation= 0 'False
Height = 315
Left = 3570
TabIndex = 3
Top = 2880
Width = 1065
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Default = -1 'True
Height = 345
Left = 2370
TabIndex = 2
Top = 2865
Width = 1065
End
Begin TabDlg.SSTab SSTab1
Height = 2625
Left = 120
TabIndex = 4
Top = 120
WhatsThisHelpID = 51
Width = 4545
_ExtentX = 8017
_ExtentY = 4630
_Version = 393216
Style = 1
Tabs = 1
TabHeight = 520
TabCaption(0) = "站点监控(&V)"
TabPicture(0) = "frmOption.frx":000C
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "Frame1"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).Control(1)= "Frame2"
Tab(0).Control(1).Enabled= 0 'False
Tab(0).ControlCount= 2
Begin VB.Frame Frame2
Caption = "子系统运行显示:"
Height = 765
Left = 150
TabIndex = 8
Top = 1530
Width = 4275
Begin MSComCtl2.UpDown UpDown2
Height = 270
Left = 1770
TabIndex = 10
Top = 330
Width = 240
_ExtentX = 423
_ExtentY = 476
_Version = 393216
AutoBuddy = -1 'True
BuddyControl = "txtShowDay"
BuddyDispid = 196618
OrigLeft = 1890
OrigTop = 210
OrigRight = 2130
OrigBottom = 465
Max = 5
SyncBuddy = -1 'True
BuddyProperty = 65547
Enabled = -1 'True
End
Begin VB.TextBox txtShowDay
Alignment = 1 'Right Justify
Height = 270
Left = 1380
MaxLength = 1
TabIndex = 1
Text = "0"
Top = 330
WhatsThisHelpID = 51
Width = 390
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "显示前后 天的信息"
Height = 180
Left = 600
TabIndex = 9
Top = 375
Width = 2160
End
End
Begin VB.Frame Frame1
Caption = "刷新速度:"
Height = 765
Left = 150
TabIndex = 5
Top = 510
Width = 4275
Begin MSComCtl2.UpDown UpDown1
Height = 270
Left = 1275
TabIndex = 7
Top = 330
Width = 240
_ExtentX = 423
_ExtentY = 476
_Version = 393216
Value = 1
AutoBuddy = -1 'True
BuddyControl = "txtRefreshSecond"
BuddyDispid = 196614
OrigLeft = 1440
OrigTop = 360
OrigRight = 1680
OrigBottom = 645
Max = 60
Min = 1
SyncBuddy = -1 'True
BuddyProperty = 65547
Enabled = -1 'True
End
Begin VB.TextBox txtRefreshSecond
Alignment = 1 'Right Justify
Height = 270
Left = 840
MaxLength = 2
TabIndex = 0
Text = "10"
Top = 330
WhatsThisHelpID = 51
Width = 435
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "每 秒刷新一次"
Height = 180
Left = 600
TabIndex = 6
Top = 375
Width = 1890
End
End
End
End
Attribute VB_Name = "frmOption"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOk_Click()
If IsNumeric(txtRefreshSecond.text) = False Then
MsgBox "请输入正确数字!"
Exit Sub
End If
If IsNumeric(txtShowDay.text) = False Then
MsgBox "请输入正确数字!"
Exit Sub
End If
If Val(txtRefreshSecond.text) < 60 And Val(txtRefreshSecond.text) > 0 Then
If Val(txtShowDay.text) <= 5 And Val(txtShowDay.text) >= 0 Then
fMainForm.tMr.Interval = Val(txtRefreshSecond.text) * 1000
fMainForm.uiShowDay = Val(txtShowDay.text)
Unload Me
Else
MsgBox "请输入适合的数字!"
End If
Else
MsgBox "请输入适合的数字!"
End If
End Sub
Private Sub Form_Load()
txtRefreshSecond.text = Int(fMainForm.tMr.Interval / 1000)
txtShowDay.text = fMainForm.uiShowDay
End Sub
Private Sub txtRefreshSecond_KeyPress(KeyAscii As Integer)
KeyAscii = IntegerEnabled(KeyAscii)
End Sub
Private Sub txtRefreshSecond_Validate(Cancel As Boolean)
If Val(txtRefreshSecond.text) >= 60 Then
MsgBox "请设置一个 1 到 59 之间的数值!", vbInformation
Cancel = True
End If
End Sub
Private Sub txtShowDay_KeyPress(KeyAscii As Integer)
KeyAscii = IntegerEnabled(KeyAscii)
End Sub
Private Sub txtShowDay_Validate(Cancel As Boolean)
If Val(txtShowDay.text) > 5 Then
MsgBox "请设置一个 0 到 5 之间的数值!", vbInformation
Cancel = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -