📄 frmrestore.frm
字号:
VERSION 5.00
Begin VB.Form frmRestore
BorderStyle = 1 'Fixed Single
Caption = "系统数据恢复"
ClientHeight = 2490
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 3990
Icon = "frmRestore.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2490
ScaleWidth = 3990
StartUpPosition = 2 '屏幕中心
Begin VB.DirListBox Dir1
Height = 1140
Left = 2070
TabIndex = 3
Top = 600
Width = 1575
End
Begin VB.DriveListBox Drive1
Height = 300
Left = 2063
TabIndex = 2
Top = 210
Width = 1575
End
Begin VB.CommandButton CancelButton
Caption = "关闭"
Default = -1 'True
Height = 300
Left = 2075
TabIndex = 1
Top = 2010
Width = 1100
End
Begin VB.CommandButton OKButton
Caption = "确定"
Height = 300
Left = 815
TabIndex = 0
Top = 2010
Width = 1100
End
Begin VB.Label Label1
Caption = "请选择源盘和路径:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 360
TabIndex = 4
Top = 210
Width = 1305
End
End
Attribute VB_Name = "frmRestore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Selpath As String '表示所选择的路径
Private Sub CancelButton_Click()
Unload frmRestore
End Sub
Private Sub Dir1_Change()
Selpath = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub Form_Load()
Dir1.Path = SystemDir + "\Data"
End Sub
Private Sub OKButton_Click()
'Dim fso As New FileSystemObject
'Selpath = Dir1.Path
'If Len(Selpath) > 3 Then
' Selpath = Selpath + "\"
'End If
'If MsgBox("真的要恢复数据吗?", vbOKCancel + vbQuestion, "数据恢复", "", 0) = vbOK Then
' '恢复前,先关闭已打开的文件
' fso.CopyFile Selpath + "ManufactBak.mdb", SystemDir + "\Data\Manufact.mdb", True
' MsgBox "数据恢复完成!", vbOKOnly + vbInformation, "数据恢复"
'End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -