📄 frmbackup.frm
字号:
VERSION 5.00
Begin VB.Form frmBackup
BorderStyle = 1 'Fixed Single
Caption = "系统数据备份"
ClientHeight = 2610
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 3990
Icon = "frmBackup.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2610
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 = 2066
TabIndex = 1
Top = 2040
Width = 1100
End
Begin VB.CommandButton OKButton
Caption = "确定"
Height = 300
Left = 824
TabIndex = 0
Top = 2040
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 = 353
TabIndex = 4
Top = 210
Width = 1305
End
End
Attribute VB_Name = "frmBackup"
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 Me
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 '如果不对 Selpath 重新赋值,则 Selpath 为空
'If Len(Selpath) > 3 Then '当 Selpath 的值为a:\ c:\ d:\ 时,本身已包括了 \
' Selpath = Selpath + "\"
'End If
'If MsgBox("真的要备份数据吗?", vbOKCancel + vbQuestion, "数据备份", "", 0) = vbOK Then
' fso.CopyFile "C:\ManuMis\Data\Manufact.mdb", Selpath + "ManufactBak.mdb", True
' MsgBox "数据备份完成!", vbOKOnly + vbInformation, "数据备份"
'End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -