📄 main_xt_sjbf.frm
字号:
VERSION 5.00
Begin VB.Form main_xt_sjbf
BorderStyle = 3 'Fixed Dialog
Caption = "系统设置——【数据备份】"
ClientHeight = 1935
ClientLeft = 3825
ClientTop = 5295
ClientWidth = 4680
Icon = "main_xt_sjbf.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1935
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Text1
Height = 495
Left = 2520
TabIndex = 3
Top = 360
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 2400
TabIndex = 1
Top = 1200
Width = 1590
End
Begin VB.CommandButton Command1
Caption = "开始备份"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 555
TabIndex = 0
Top = 1215
Width = 1590
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "将数据备份到 盘 "
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 915
TabIndex = 2
Top = 390
Width = 3255
End
End
Attribute VB_Name = "main_xt_sjbf"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Dir1_Change()
End Sub
Private Sub Form_Activate()
'赋值给text1
Text1.Text = "A"
End Sub
Private Sub Command1_Click() '确认数据备份
YesNo = MsgBox("准备好了吗?", vbNo + vbQuestion)
If YesNo = vbNo Then
Exit Sub
End If
On Error GoTo errprompt
Me.MousePointer = 11 '设置鼠标形状
MkDir (Text1.Text & ":\数据备份")
FileCopy App.Path & "\xhgl.mdb", Text1.Text & ":\数据备份\xhgl.mdb"
Me.MousePointer = 0
MsgBox "数据已备份完毕。"
errprompt:
Me.MousePointer = 0
Select Case Err.Number
Case 57
MsgBox "磁盘已满!", vbCritical
Case 70
MsgBox "磁盘写保护!", vbCritical
End Select
End Sub
Private Sub Command2_Click()
Load frm_main
frm_main.Show
frm_main.Enabled = True
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -