Private Sub yihu_Click()
frmCuifei.muser1 = 1
frmCuifei.Show
End Sub
4. 备份界面设计:
:
备份代码设计:
Private Sub Command1_Click()
Dim a As String
a = App.Path
a = a & "\"
b = Text1.Text
'On Error GoTo errhandle:
Dim filename As String
filename = "" & Text1.Text & "dbdb.mdb"
If a = Text1.Text Then
MsgBox "备份目录与原文件目录相同,请重新选择!"
Exit Sub
End If
If Dir("" & b & "dbdb.mdb") <> "" Then
Dim llp As String
llp = MsgBox("此目录下已有该文件,要覆盖吗?", vbYesNo, "备份文件")
If llp = vbYes Then
Kill ("" & b & "dbdb.mdb")
FileCopy "" & a & "\data\dbdb.mdb", "" & b & "dbdb.mdb"
Dim l
l = MsgBox(" 备份成功! ", vbOKOnly, "提示")
Else
Exit Sub
End If
Else
FileCopy "" & a & "\data\dbdb.mdb", "" & b & "dbdb.mdb"
Dim ll
ll = MsgBox(" 备份成功! ", vbOKOnly, "提示")
End If
Exit Sub
'errhandle:
'MsgBox "出现错误,不能复制", vbOKOnly + vbCritical, "复制文件"
'Resume Next
End Sub
Private Sub Command2_Click()
'dy
'Me.Hide
Unload Me
End Sub
Private Sub Dir1_Change()
'Drive1.Drive = Dir1
If Right(Dir1.Path, 1) <> "\" Then
Text1.Text = Dir1.Path + "\"
Else
Text1.Text = Dir1.Path
End If
Command1.Enabled = True
End Sub
Private Sub Dir1_Click()
If Right(Dir1.Path, 1) <> "\" Then
Text1.Text = Dir1.Path + "\"
Else
Text1.Text = Dir1.Path
End If
Command1.Enabled = True
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub Form_Activate()
Command1.Enabled = False
gCnn.Close
ChDrive App.Path
ChDir App.Path
'Text1.SetFocus
'Text1.Text = "c:\"
Text1.Text = CurDir()
Text1.Enabled = False
End Sub
Private Sub Form_Load()
ChDrive App.Path
ChDir App.Path
End Sub
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] 下一页