📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "数据备份"
ClientHeight = 2130
ClientLeft = 60
ClientTop = 345
ClientWidth = 4425
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 2130
ScaleWidth = 4425
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command3
Caption = "开始备份(到C盘)"
Height = 405
Left = 1245
TabIndex = 2
Top = 870
Width = 2000
End
Begin VB.CommandButton Command1
Caption = "开始备份(到A盘)"
Height = 405
Left = 1245
TabIndex = 1
Top = 240
Width = 2000
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 405
Left = 1245
TabIndex = 0
Top = 1440
Width = 2000
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
YesNo = MsgBox("软盘插好了吗?", vbNo + vbQuestion)
If YesNo = vbNo Then
Exit Sub
End If
On Error GoTo errprompt
Me.MousePointer = 11
FileCopy App.Path & "\mrlc.mdb", "A:\mrlc" & Date & ".mdb"
Me.MousePointer = 0
MsgBox "数据已备份完毕。"
errprompt:
Me.MousePointer = 0
Select Case Err.Number
Case 57
MsgBox "磁盘已坏!", vbCritical
Case 70
MsgBox "磁盘写保护!", vbCritical
Case 71
MsgBox "磁盘未准备好!", vbCritical
End Select
End Sub
Private Sub Command3_Click()
Me.MousePointer = 11
FileCopy App.Path & "\mrlc.mdb", "c:\mrlc" & Date & ".mdb"
Me.MousePointer = 0
MsgBox "数据已备份完毕。"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -