|
|
Title | Add files to the Recent Documents list and clear the list |
Description | This example shows how to add files to the Recent Documents list and clear the list in Visual Basic 6 by using the SHAddToRecentDocs API function. |
Keywords | Recent Documents, Recent Documents list |
Categories | API, Windows |
|
|
To add a file to the Recent Documents list, call SHAddToRecentDocs passing it the flag SHARD_PATH and the document name. (The flag SHARD_PATH means you are passing in a file name.)
To clear the Recent Documents list, call SHAddToRecentDocs passing it a null string.
|
|
' Add the file to the Recent Documents list.
Private Sub cmdAdd_Click()
SHAddToRecentDocs SHARD_PATH, txtDocumentName.Text
MsgBox "OK"
End Sub
' Clear the Recent Documents list.
Private Sub cmdClear_Click()
SHAddToRecentDocs SHARD_PATH, vbNullString
MsgBox "OK"
End Sub
|
|
|
|
|
|