📄 frmautobackup.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmAutoBackup
Caption = "自动备份设置"
ClientHeight = 2460
ClientLeft = 60
ClientTop = 345
ClientWidth = 4125
Icon = "frmAutoBackup.frx":0000
LinkTopic = "Form1"
ScaleHeight = 2460
ScaleWidth = 4125
StartUpPosition = 2 '屏幕中心
Begin VB.CheckBox Check1
Caption = "自动"
Height = 225
Left = 3000
TabIndex = 9
Top = 2100
Width = 945
End
Begin VB.CommandButton Command2
Caption = "退出(&Q)"
Height = 375
Left = 1590
TabIndex = 8
Top = 2010
Width = 1035
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
Height = 375
Left = 240
TabIndex = 7
Top = 2010
Width = 1005
End
Begin VB.Frame Frame1
Caption = "备份频率:"
Height = 585
Left = 0
TabIndex = 1
Top = 60
Width = 4095
Begin VB.OptionButton Option1
Caption = "每天"
Height = 255
Left = 720
TabIndex = 3
Top = 240
Value = -1 'True
Width = 705
End
Begin VB.OptionButton Option2
Caption = "每周"
Height = 285
Left = 2520
TabIndex = 2
Top = 210
Width = 735
End
End
Begin VB.Frame Frame2
Caption = "备份时间:"
Height = 1275
Left = 0
TabIndex = 0
Top = 660
Width = 4095
Begin VB.ComboBox cboWeek
Height = 300
ItemData = "frmAutoBackup.frx":0442
Left = 1350
List = "frmAutoBackup.frx":045B
TabIndex = 6
Top = 360
Visible = 0 'False
Width = 1515
End
Begin MSComCtl2.DTPicker dtpday
Height = 315
Left = 1350
TabIndex = 4
Top = 780
Width = 1515
_ExtentX = 2672
_ExtentY = 556
_Version = 393216
CustomFormat = "hh:mm"
Format = 23789570
CurrentDate = 37614
End
Begin VB.Label Label1
Caption = "起始时间:"
Height = 315
Left = 90
TabIndex = 5
Top = 450
Width = 915
End
End
End
Attribute VB_Name = "frmAutoBackup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Option1.Value = True Then
SaveSetting App.Title, "AutoBackup", "周期", "Day"
SaveSetting App.Title, "AutoBackup", "DayTime", Format(dtpday.Value, "hh:mm")
Else
SaveSetting App.Title, "AutoBackup", "周期", "Week"
SaveSetting App.Title, "AutoBackup", "WeekDay", Trim$(cboWeek.text)
SaveSetting App.Title, "AutoBackup", "WeekTime", Format(dtpday.Value, "hh:mm")
End If
If Check1.Value = 1 Then
SaveSetting App.Title, "AutoBackup", "设置", "自动"
Else
SaveSetting App.Title, "AutoBackup", "设置", "手动"
End If
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim str As String
str = GetSetting(App.Title, "AutoBackup", "周期")
If str = "Day" Then
Option1.Value = True
Option2.Value = False
cboWeek.Visible = False
dtpday.Visible = True
dtpday.Value = GetSetting(App.Title, "AutoBackup", "DayTime")
Else
Option1.Value = False
Option2.Value = True
cboWeek.Visible = True
dtpday.Visible = True
cboWeek.text = GetSetting(App.Title, "AutoBackup", "WeekDay")
dtpday.Value = GetSetting(App.Title, "AutoBackup", "WeekTime", Date)
End If
If GetSetting(App.Title, "AutoBackup", "设置") = "自动" Then
Check1.Value = 1
Else
Check1.Value = 0
End If
End Sub
Private Sub Option1_Click()
cboWeek.Visible = False
dtpday.Visible = True
End Sub
Private Sub Option2_Click()
cboWeek.Visible = True
dtpday.Visible = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -