📄 frmdbcopy.frm
字号:
VERSION 5.00
Begin VB.Form Form5
BackColor = &H00FFC0C0&
Caption = "数据库管理---数据库备份"
ClientHeight = 4920
ClientLeft = 60
ClientTop = 450
ClientWidth = 8655
Icon = "frmdbcopy.frx":0000
LinkTopic = "Form5"
ScaleHeight = 4920
ScaleWidth = 8655
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
BackColor = &H00FFC0C0&
Caption = "取 消"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 6360
Style = 1 'Graphical
TabIndex = 7
Top = 3000
Width = 735
End
Begin VB.CommandButton Command1
BackColor = &H00FFC0C0&
Caption = "确 定"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 4680
Style = 1 'Graphical
TabIndex = 6
Top = 3000
Width = 735
End
Begin VB.TextBox Text2
Height = 495
Left = 4800
TabIndex = 4
Top = 1440
Width = 3375
End
Begin VB.TextBox Text1
Height = 375
Left = 1920
TabIndex = 2
Top = 240
Width = 6015
End
Begin VB.DriveListBox Drive1
Height = 300
Left = 120
TabIndex = 1
Top = 4200
Width = 3135
End
Begin VB.DirListBox Dir1
Height = 3030
Left = 120
TabIndex = 0
Top = 960
Width = 2535
End
Begin VB.Label Label3
BackColor = &H00FFC0C0&
Caption = "* 数据库名称不需要加后缀名"
ForeColor = &H008080FF&
Height = 255
Left = 5520
TabIndex = 8
Top = 960
Width = 2655
End
Begin VB.Label Label2
BackColor = &H00FFC0C0&
Caption = "数据库保存名称:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3120
TabIndex = 5
Top = 1560
Width = 1575
End
Begin VB.Label Label1
BackColor = &H00FFC0C0&
Caption = "路 径:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
TabIndex = 3
Top = 240
Width = 975
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim z As Integer
If Text1.Text = "" Then
z = MsgBox("请选择存储的路径!!", vbOKOnly + vbExclamation, "警告")
Text1.SetFocus
Else
If Text2.Text = "" Then
z = MsgBox("请输入备份的数据库名称!!", vbOKOnly + vbExclamation, "警告")
Text2.SetFocus
Else
Me.MousePointer = 11
Dim location As String
location = Trim(Text1.Text) & "\" & Trim(Text2.Text)
FileCopy App.Path & "\bedroom.mdb", location & ".mdb"
Me.MousePointer = 0
z = MsgBox("数据备份完成,备份文件为:" & location & ".mdb", vbOKOnly, "备份")
If z Then
Unload Me
frmdefault.Show
End If
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
frmdefault.Show
End Sub
Private Sub Dir1_Click()
Text1.Text = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub Form_Load()
Me.Width = 8775
Me.Height = 5430
Text2.Text = "studentinfor" & Date
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -