Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MS Word Most Recently Used File
Message
 
To
05/01/2004 01:24:39
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00863476
Message ID:
00863844
Views:
21
Try this:
PROCEDURE iOPenRecentDocFile

cSpecialFolderPath = space(255)
DECLARE SHGetSpecialFolderPath IN SHELL32.DLL ;
      LONG hwndOwner, ;
      STRING @cSpecialFolderPath, ;
      LONG  nWhichFolder

CSIDL_RECENT  = 8

SHGetSpecialFolderPath(0, @cSpecialFolderPath, CSIDL_RECENT)

cSpecialFolderPath=SubStr(RTrim(cSpecialFolderPath),1, ;
                      Len(RTrim(cSpecialFolderPath))-1)

CLEAR DLLS

IF ADIR(aa,cSpecialFolderPath+"\*.doc.lnk")<=0
	?"NO recently used doc files found."
	RETURN
endif

DECLARE INTEGER ShellExecute IN SHELL32.dll ; 
	INTEGER nWinHandle, ; 
	STRING cOperation, ; 
	STRING cFileName, ; 
	STRING cParameters, ; 
	STRING cDirectory, ; 
	INTEGER nShowWindow

?ShellExecute(0,"Open",cSpecialFolderPath+"\"+aa[1,1], "", '', 1)

CLEAR DLLS
>Yes,
>
>This is what I am talking about but it's speed is slow.
>I think the fastest is accessing the registry.
>I am not sure where is this information stored in the registry.
>Any idea?
Previous
Reply
Map
View

Click here to load this message in the networking platform