?? modrecentlist.bas
字號:
Attribute VB_Name = "ModRecentList"
Option Explicit
Public Const ThisKey = "Recent Files"
Sub GetRecentFiles(frm As Form)
Dim i As Integer
Dim varFiles As Variant
If GetSetting(App.EXEName, ThisKey, "RecentFile1") = Empty Then Exit Sub
varFiles = GetAllSettings(App.EXEName, ThisKey)
For i = 0 To UBound(varFiles, 1)
frm.mnuRecentFile(0).Visible = True
frm.mnuRecentFile(i + 1).Caption = "&" & (i + 1) & " " & varFiles(i, 1)
frm.mnuRecentFile(i + 1).Visible = True
Next i
End Sub
Sub WriteRecentFiles(frm As Form, OpenFileName)
Dim i As Integer
Dim strFile As String, strKey As String, strShort As String
For i = 1 To 4
If LCase(Mid(frm.mnuRecentFile(i).Caption, 4)) = LCase(OpenFileName) Then
Exit Sub
End If
Next i
For i = 3 To 1 Step -1
strKey = "RecentFile" & i
strFile = GetSetting(App.EXEName, ThisKey, strKey)
If strFile <> "" Then
strKey = "RecentFile" & (i + 1)
SaveSetting App.EXEName, ThisKey, strKey, strFile
End If
Next i
SaveSetting App.EXEName, ThisKey, "RecentFile1", UCase(OpenFileName)
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -