📄 frmbackup.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmBackup
BorderStyle = 3 'Fixed Dialog
Caption = "备份"
ClientHeight = 4425
ClientLeft = 1800
ClientTop = 2310
ClientWidth = 6405
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4425
ScaleMode = 0 'User
ScaleWidth = 6405
ShowInTaskbar = 0 'False
Begin VB.CommandButton cmdPrevious
Caption = "< 上一步(&P)"
Height = 350
Left = 2310
TabIndex = 27
Top = 3900
Width = 1300
End
Begin VB.CommandButton cmdCancel
Caption = " 取消(&C)"
Height = 350
Left = 4950
TabIndex = 20
Top = 3900
Width = 1300
End
Begin VB.CommandButton cmdNext
Caption = " 下一步(&N) >"
Height = 350
Left = 3630
TabIndex = 19
Top = 3900
Width = 1300
End
Begin VB.Frame frmStep1
Caption = "备份方式选择"
Height = 3525
Left = 150
TabIndex = 2
Top = 150
Width = 6105
Begin VB.DriveListBox Drive
Height = 300
Left = 3525
TabIndex = 35
Top = 2550
Width = 1680
End
Begin VB.CheckBox chkRegToCD
Caption = "备份登记类文书"
Height = 225
Left = 1545
TabIndex = 18
Top = 2610
Width = 2475
End
Begin VB.CheckBox chkRegToHD
Caption = "备份登记类文书"
Height = 345
Left = 1530
TabIndex = 17
Top = 1410
Width = 2505
End
Begin MSComCtl2.UpDown UpDHD1
Height = 285
Left = 2925
TabIndex = 15
Top = 1050
Width = 240
_ExtentX = 476
_ExtentY = 503
_Version = 393216
Enabled = -1 'True
End
Begin VB.TextBox txtSSSQHD1
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 1530
MaxLength = 6
TabIndex = 13
Top = 1050
Width = 1410
End
Begin VB.TextBox txtSSSQHD2
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 3510
MaxLength = 6
TabIndex = 12
Top = 1050
Width = 1410
End
Begin MSComCtl2.UpDown UpDCD2
Height = 285
Left = 4920
TabIndex = 10
Top = 2190
Width = 240
_ExtentX = 476
_ExtentY = 503
_Version = 393216
Enabled = -1 'True
End
Begin MSComCtl2.UpDown UpDCD1
Height = 285
Left = 2940
TabIndex = 9
Top = 2190
Width = 240
_ExtentX = 476
_ExtentY = 503
_Version = 393216
Enabled = -1 'True
End
Begin VB.TextBox txtSSSQCD1
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 1545
MaxLength = 6
TabIndex = 6
Top = 2190
Width = 1410
End
Begin VB.TextBox txtSSSQCD2
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 3525
MaxLength = 6
TabIndex = 5
Top = 2190
Width = 1410
End
Begin VB.CommandButton CmdSelePath
Caption = "..."
Height = 300
Left = 5175
TabIndex = 4
Top = 690
Width = 615
End
Begin VB.TextBox txtPath
Height = 300
Left = 1545
TabIndex = 3
Top = 690
Width = 3615
End
Begin VB.OptionButton OptBkToCD
Caption = "备份至光盘"
Height = 375
Left = 300
TabIndex = 1
Top = 1800
Width = 1275
End
Begin VB.OptionButton OptBkToHD
Caption = "备份至其他目录 (以后可再将该备份刻入 CD-R )"
Height = 315
Left = 300
TabIndex = 0
Top = 330
Width = 5595
End
Begin MSComCtl2.UpDown UpDHD2
Height = 285
Left = 4905
TabIndex = 16
Top = 1050
Width = 270
_ExtentX = 476
_ExtentY = 503
_Version = 393216
Enabled = -1 'True
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "所属时期从 到"
Height = 180
Left = 570
TabIndex = 14
Top = 1110
Width = 2880
End
Begin VB.Label Label1
Caption = "注:备份至光盘需要安装 Adaptec DierctCD 或者其他能直接写 CD-R 的软件"
Height = 405
Left = 570
TabIndex = 11
Top = 3000
Width = 5115
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "所属时期从 到"
Height = 180
Left = 585
TabIndex = 8
Top = 2250
Width = 2880
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "备份目录为"
Height = 180
Left = 570
TabIndex = 7
Top = 750
Width = 900
End
End
Begin VB.Frame frmStep21
Caption = "备份文件信息"
Height = 1635
Left = 150
TabIndex = 21
Top = 135
Width = 6105
Begin VB.Label lblFileSize
Alignment = 1 'Right Justify
BorderStyle = 1 'Fixed Single
Caption = "FileSize"
Height = 300
Left = 2100
TabIndex = 29
Top = 840
Width = 1995
End
Begin VB.Label lblFileNum
Alignment = 1 'Right Justify
BorderStyle = 1 'Fixed Single
Caption = "FileNumber"
Height = 300
Left = 2100
TabIndex = 28
Top = 390
Width = 1995
End
Begin VB.Label lblBkFileNumL
AutoSize = -1 'True
Caption = "备份文件数量"
Height = 180
Left = 480
TabIndex = 23
Top = 450
Width = 1080
End
Begin VB.Label lblBkFileLenL
AutoSize = -1 'True
Caption = "备份文件大小"
Height = 180
Left = 480
TabIndex = 22
Top = 870
Width = 1080
End
End
Begin VB.Frame frmStep22
Caption = "备份磁盘信息"
Height = 1815
Left = 150
TabIndex = 24
Top = 1890
Width = 6105
Begin VB.Label lblFreeSpace
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Caption = "DiskFreeSpace"
Height = 315
Left = 2100
TabIndex = 31
Top = 810
Width = 1995
End
Begin VB.Label lblDiskInfo
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Caption = "DiskInformation"
Height = 315
Left = 2100
TabIndex = 30
Top = 360
Width = 1995
End
Begin VB.Label lblHDInfoL
AutoSize = -1 'True
Caption = "备份磁盘路径"
Height = 180
Left = 510
TabIndex = 26
Top = 420
Width = 1080
End
Begin VB.Label lblHDFreeSizeL
AutoSize = -1 'True
Caption = "备份磁盘剩余空间"
Height = 180
Left = 510
TabIndex = 25
Top = 870
Width = 1440
End
End
Begin VB.Frame frmStep3
Caption = "开始备份"
Height = 3555
Left = 150
TabIndex = 32
Top = 150
Width = 6105
Begin VB.PictureBox picBegin
Height = 3015
Left = 240
ScaleHeight = 2955
ScaleWidth = 1560
TabIndex = 33
Top = 330
Width = 1620
End
Begin VB.Label lblStep3
AutoSize = -1 'True
Caption = "现在可以开始备份,请按[下一步]继续"
Height = 690
Left = 2145
TabIndex = 34
Top = 360
Width = 2970
End
End
End
Attribute VB_Name = "frmBackup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Msg As String
Public StartBackup As String
Public DiscPath As String
Public DiscSize As Integer
Dim Step1 As Boolean
Dim Step2 As Boolean
Dim Step3 As Boolean
Dim Fso As FileSystemObject
Dim rstBackupFile As ADODB.Recordset
Dim BackupFinished As Boolean
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub CmdNext_Click()
'根据不同的步骤,显示不同的控件
If Step1 Then
If OptBkToHD.Value = True And Trim(txtPath) = vbNullString Then
MsgBox "请输入或选择备份路径!", vbInformation
txtPath.SetFocus
SendKeys "{Home}+{End}"
Exit Sub
End If
'检查备份路径
If OptBkToHD.Value = True And CheckPath = False Then
MsgBox "备份路径非法!", vbCritical
txtPath.SetFocus
SendKeys "{Home}+{End}"
Exit Sub
End If
'取得备份介质信息
If OptBkToHD.Value = True Then
If GetDiskInfo = False Then
Exit Sub
End If
Else
If GetCD_RomInfo = False Then
Exit Sub
End If
End If
'取得要备份的文件信息
If GetFileInfo = False Then
Exit Sub
End If
cmdPrevious.Visible = True
frmStep1.Visible = False
frmStep21.Visible = True
frmStep22.Visible = True
frmStep3.Visible = False
Step1 = False
Step2 = True
Step3 = False
Exit Sub
End If
If Step2 Then
'如果剩余空间不足,则退出
If OptBkToHD.Value = True And CheckSize = False Then
MsgBox "剩余空间不足,请释放部分磁盘空间以后再试!", vbInformation
Exit Sub
End If
cmdPrevious.Visible = True
frmStep1.Visible = False
frmStep21.Visible = False
frmStep22.Visible = False
frmStep3.Visible = True
Step1 = False
Step2 = False
Step3 = True
Exit Sub
End If
If Step3 Then
cmdPrevious.Visible = False
cmdNext.Visible = False
If OptBkToHD.Value = True Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -