📄 frmbackup.frm
字号:
VERSION 5.00
Object = "{29743316-0803-11D5-AD8E-0050BAA9AC14}#8.1#0"; "MOVEFO~1.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{16ED326C-4081-11D5-B5BD-0050BAA9AC14}#9.0#0"; "DBBackup.ocx"
Begin VB.Form frmBackup
BorderStyle = 3 'Fixed Dialog
Caption = "备份与恢复"
ClientHeight = 4995
ClientLeft = 45
ClientTop = 330
ClientWidth = 6390
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmBackup.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4995
ScaleWidth = 6390
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog dlgBrowser
Left = 3105
Top = 2190
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command1
Caption = ".."
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 6030
TabIndex = 3
Top = 1050
Visible = 0 'False
Width = 210
End
Begin 给出焦点文本框.FocusText txtPath
Height = 330
Left = 255
TabIndex = 0
Top = 150
Visible = 0 'False
Width = 5760
_ExtentX = 10160
_ExtentY = 582
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BorderStyle = 0
End
Begin DataBaseBackup.DataBackup DataBackup1
Height = 3360
Left = 165
TabIndex = 1
Top = 750
Width = 5985
_ExtentX = 10557
_ExtentY = 5927
End
Begin VB.Line Line1
BorderColor = &H00808080&
X1 = 1200
X2 = 6105
Y1 = 4410
Y2 = 4410
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "在【请选择需要《恢复》的文件】中输入要恢复的文件或选择?"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404040&
Height = 240
Index = 3
Left = 1170
TabIndex = 9
Top = 4440
Width = 5040
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "在【请选择需要《备份》的文件】中输入要备份的文件或选择?"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 240
Index = 2
Left = 1170
TabIndex = 8
Top = 4140
Width = 5040
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "恢复:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404040&
Height = 240
Index = 1
Left = 720
TabIndex = 7
Top = 4440
Width = 405
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "备份:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 240
Index = 0
Left = 720
TabIndex = 6
Top = 4140
Width = 405
End
Begin VB.Image Image1
Height = 480
Left = 150
Picture = "frmBackup.frx":08CA
Top = 4170
Width = 480
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = ":::::::::::: 数据库备份与恢复 ::::::::::::"
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 435
Index = 1
Left = 315
TabIndex = 5
Top = 240
Width = 5625
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = ":::::::::::: 数据库备份与恢复 ::::::::::::"
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 435
Index = 0
Left = 300
TabIndex = 4
Top = 255
Width = 5625
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "服务器数据库配置:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Index = 0
Left = 270
TabIndex = 2
Top = 1080
Visible = 0 'False
Width = 1620
End
End
Attribute VB_Name = "frmBackup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdLocal_Click()
On Error Resume Next
dlgBrowser.DialogTitle = "请选择本地数据库文件"
dlgBrowser.CancelError = True
dlgBrowser.Filter = "Access文件(*.MDB)|*.MDB"
dlgBrowser.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly + cdlOFNPathMustExist
dlgBrowser.ShowOpen
If dlgBrowser.FileName <> "" Then
txtLocalPath = dlgBrowser.FileName
End If
txtLocalPath.SetFocus
If Err.Number = 32755 Then '取消时
Exit Sub
End If
End Sub
Private Sub Command1_Click()
On Error Resume Next
dlgBrowser.DialogTitle = "请选择服务器数据库文件"
dlgBrowser.CancelError = True
dlgBrowser.Filter = "Access文件(*.MDB)|*.MDB"
dlgBrowser.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly + cdlOFNPathMustExist
dlgBrowser.ShowOpen
If dlgBrowser.FileName <> "" Then
txtPath = dlgBrowser.FileName
End If
txtPath.SetFocus
If Err.Number = 32755 Then '取消时
Exit Sub
End If
End Sub
Private Sub Form_Load()
GetFormSet Me, Screen
DataBackup1.BackUpFileFrom = AccessFile
DataBackup1.RestoreFileTo = App.Path
txtLocalPath = AccessFile
End Sub
Private Sub Form_Unload(Cancel As Integer)
SaveFormSet Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -