📄 dateresult.frm
字号:
VERSION 5.00
Begin VB.Form dateresult
Caption = "恢复"
ClientHeight = 4875
ClientLeft = 135
ClientTop = 420
ClientWidth = 6900
LinkTopic = "Form1"
ScaleHeight = 4875
ScaleWidth = 6900
StartUpPosition = 3 '窗口缺省
Begin VB.Frame frameBackup
Caption = "最后备份的情况"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 2535
Left = 0
TabIndex = 2
Top = 0
Width = 7455
Begin VB.Label lblLastTime
Caption = "最后备份的时间"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF8080&
Height = 255
Left = 1200
TabIndex = 8
Top = 1920
Width = 3855
End
Begin VB.Label lblLastDate
Caption = "最后备份的日期"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF8080&
Height = 255
Left = 1200
TabIndex = 7
Top = 1200
Width = 3375
End
Begin VB.Label Time
Caption = " 时 间"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Left = 120
TabIndex = 6
Top = 1920
Width = 975
End
Begin VB.Label lblDate
Caption = " 日 期"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Left = 120
TabIndex = 5
Top = 1200
Width = 975
End
Begin VB.Label lblPath
Caption = " 路 径"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Left = 120
TabIndex = 4
Top = 480
Width = 975
End
Begin VB.Label lblLastPath
Caption = "最后备份的路径"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF8080&
Height = 615
Left = 1200
TabIndex = 3
Top = 480
Width = 4935
End
End
Begin VB.CommandButton cmdHuifu
Caption = "恢复(&H)"
Height = 735
Left = 1680
TabIndex = 1
Top = 2760
Width = 1335
End
Begin VB.CommandButton cmdCancel
Caption = "取消(&C)"
Height = 735
Left = 4320
TabIndex = 0
Top = 2760
Width = 1215
End
End
Attribute VB_Name = "dateresult"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Dim Fsys As New FileSystemObject
'Dim bckupFile As File
Dim lastPath As String
Private Sub Form_Load()
Dim lastPath As String
Dim lastDate As String
Dim lastTime As String
lastPath = GetSetting(App.Title, "Settings", "BackupPath")
lastDate = GetSetting(App.Title, "Settings", "BackupDate")
lastTime = GetSetting(App.Title, "Settings", "BackupTime")
If lastPath = "" Then
cmdHuifu.Enabled = False
lblLastPath.Caption = "没有备份记录!"
lblLastDate.Caption = " "
lblLastTime.Caption = " "
Else
lblLastPath.Caption = lastPath
lblLastDate.Caption = lastDate & " (mm-dd-yy)"
lblLastTime.Caption = lastTime
End If
End Sub
Private Sub cmdCancel_Click()
Unload Me
frm_main.Show
frm_main.Enabled = True
End Sub
Private Sub cmdHuifu_click()
On Error Resume Next
cmdHuifu.Enabled = False
destination = App.Path & "\" & "医院药品进销存系统.mdb"
Source = lastPath
Fsys.CopyFile Source, destination, True
cmdHuifu.Enabled = True
MsgBox "恢复完成!", vbInformation, "恢复"
Unload Me
frm_main.Show
frm_main.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -