Windows 95 maintains a list of
the most recently used files that can be
accessed quickly using the Start
Menu. Files can be added to
the list easily form Visual Basic using
the API function SHAddToRecentDocs
function. To add a file to the file
list, you must first declare the function
in the declarations section of your
project.
Declare Sub SHAddToRecentDocs Lib
"shell32.dll" _
(ByVal uFlags As Long, ByVal pv As
String)
Now that the function has been
declared, the following code can be used
to add a file to the list.
Dim NewFile as String
NewFile="c:\newfile.file"
Call
SHAddToRecentDocs(2,NewFile)
It is also possible to clear the
list of files by using the following
code.
Call
SHAddToRecentDocs(2,vbNullString)
|