?? main_xt_sjhf.frm
字號:
VERSION 5.00
Begin VB.Form frmDatarestore
BorderStyle = 3 'Fixed Dialog
Caption = "數據中心——【數據恢復】"
ClientHeight = 2520
ClientLeft = 3825
ClientTop = 5295
ClientWidth = 5025
Icon = "main_xt_sjhf.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "main_xt_sjhf.frx":030A
ScaleHeight = 2520
ScaleWidth = 5025
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.ListBox List1
Height = 1140
Left = 840
TabIndex = 3
Top = 960
Width = 1695
End
Begin VB.CommandButton Command2
Height = 380
Left = 2880
Picture = "main_xt_sjhf.frx":0CEE
Style = 1 'Graphical
TabIndex = 1
Top = 1680
Width = 940
End
Begin VB.CommandButton Command1
Height = 380
Left = 2880
Picture = "main_xt_sjhf.frx":1136
Style = 1 'Graphical
TabIndex = 0
Top = 1080
Width = 940
End
Begin VB.Image Image1
Height = 480
Left = 240
Picture = "main_xt_sjhf.frx":163A
Top = 240
Width = 480
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "請與下邊列表中選擇欲恢復的數據,然后開始恢復,并且恢復的數據重新登陸后生效!!"
ForeColor = &H000000C0&
Height = 630
Left = 840
TabIndex = 2
Top = 240
Width = 3735
End
End
Attribute VB_Name = "frmDatarestore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'枚舉備份目錄下所有文件數據文件到list 中
Public Function AutoListFiles(ByVal sDirName As String, ByVal FileFilter As String) As Boolean
Dim sName As String, sFile As String, sExt As String
Dim sDirList() As String, iDirNum As Integer, i As Integer
Dim filename
'首先枚舉所有文件
sFile = Dir(sDirName + FileFilter, vbNormal + vbArchive + vbHidden)
Do While Len(sFile) > 0
sFile = UCase(Trim(sFile))
'在此處可以將 sFile 加入到一個 list1
filename = Format(Left(sFile, 8), "0000-00-00")
List1.AddItem filename
sFile = Dir '下一個文件
Loop
End Function
Private Sub Command1_Click() '確認數據恢復
Dim reponse
If List1.Text = "" Then
MsgBox "沒有選擇備份數據,請選擇...", vbOKOnly, "提示"
Else
reponse = MsgBox("現在數據將被備份數據代替,并且需要重新登陸系統才能生效,還恢復嗎?", vbOKCancel, "警告")
If reponse = vbOK Then
FileCopy App.Path & "\backup\" & Format(List1.Text, "yyyymmdd") & ".mdb", App.Path & "\bkroom.mdb"
MDIForm1.Visible = False
main_mima.Show
Else
End If
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Activate()
AutoListFiles App.Path & "\backup\", "*.mdb"
End Sub
Private Sub Form_Unload(Cancel As Integer)
MDIForm1.Enabled = True
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -