📄 bk.frm
字号:
VERSION 5.00
Begin VB.Form bk
BorderStyle = 3 'Fixed Dialog
Caption = "备份与恢复"
ClientHeight = 4965
ClientLeft = 45
ClientTop = 330
ClientWidth = 6750
Icon = "bk.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4965
ScaleWidth = 6750
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command4
Cancel = -1 'True
Caption = "退 出(&Y)"
Default = -1 'True
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5160
TabIndex = 7
Top = 4560
Width = 1575
End
Begin VB.CommandButton Command3
Caption = "恢 复(&R)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3480
TabIndex = 6
Top = 4560
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "删 除(&D)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5160
TabIndex = 5
Top = 4080
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "备 份(&B)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3480
TabIndex = 4
Top = 4080
Width = 1575
End
Begin VB.FileListBox File1
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3990
Left = 3240
Pattern = "*.bak"
TabIndex = 3
Top = 0
Width = 3495
End
Begin VB.PictureBox Picture1
BackColor = &H00FFE09E&
Height = 3975
Left = 0
Picture = "bk.frx":08CA
ScaleHeight = 3915
ScaleWidth = 3075
TabIndex = 0
TabStop = 0 'False
Top = 0
Width = 3135
Begin VB.Shape Shape2
BorderColor = &H0000FF00&
BorderWidth = 2
Height = 15
Left = 120
Top = 1000
Width = 2055
End
Begin VB.Shape Shape1
BorderColor = &H000000FF&
BorderWidth = 2
Height = 15
Left = 120
Top = 960
Width = 2175
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "备份与恢复"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Index = 1
Left = 1005
TabIndex = 2
Top = 525
Width = 1935
End
Begin VB.Image Image1
Height = 600
Left = 240
Picture = "bk.frx":3A92E
Stretch = -1 'True
Top = 240
Width = 600
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "备份与恢复"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Index = 0
Left = 1000
TabIndex = 1
Top = 500
Width = 1935
End
End
End
Attribute VB_Name = "bk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Len(File1.FileName) <> 0 Then
FileSystem.Kill App.Path & "\backup\" & File1.FileName
End If
File1.Refresh
End Sub
Private Sub Command2_Click()
Dim temp As New bk_1
1
temp.Show 1
If temp.yesno = False Then Exit Sub
nn = temp.nn
main.connect.Close
If FileExists(App.Path & "\backup\" & nn & ".bak") = True Then
MsgBox "已有同名备份"
GoTo 1
End If
FileSystem.FileCopy App.Path & "\scdb.mmm", App.Path & "\backup\" & nn & ".bak"
main.connect.Open connectstring
File1.Refresh
End Sub
Private Sub Command3_Click()
If MsgBox("您确认以[" & File1.FileName & "]恢复您的数据库吗?", vbYesNo Or vbQuestion, "提示") = vbYes Then
main.connect.Close
FileSystem.Kill App.Path & "\scdb.mmm"
FileSystem.FileCopy App.Path & "\backup\" & File1.FileName, App.Path & "\scdb.mmm"
main.connect.Open connectstring
MsgBox "恢复完成"
End If
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
File1.Path = App.Path & "\backup"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -