Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS Word Most Recently Used File
Message
 
À
05/01/2004 01:24:39
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00863476
Message ID:
00863844
Vues:
20
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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform