jeu. 17 août 2023, 16h41
Jean =c3=a0 Grenoble
atoutfox.public.association
Re=3a Nom de fichier en langue =c3=a9trang=c3=a8re
Bonjour Amos,
est-ce que ce site peut t'aider :
https://learn.microsoft.com/fr-fr/windows/win32/shell/shell-browseforfolderavec ce petit bout de programme
[VFP]
LOCAL oBrowseObject, cPathToReturn, oShellObj
oShellObj = CREATEOBJ('Shell.Application')
cPathToReturn = ''
* Get a Folder object
oBrowseObject = oShellObj.BrowseForFolder(0, cDialogTitle, nBrowseFlags,
cStartingFolder)
* Before I used the Items collection of the Folder object
* to get a path; it doesn't work if the directory is empty.
* Instead, spin through the Items collection of the Parent
* Folder and locate the item whose name matches the
* Title property of the Folder object; return that path
IF TYPE('oBrowseObject') = 'O' AND ! ISNULL(m.oBrowseObject)
FOR EACH item IN oBrowseObject.ParentFolder.Items
IF item.name == oBrowseObject.title
cPathToReturn = Item.Path
EXIT
ENDIF
ENDFOR
ENDIF
[\VFP]
bon courage !
Jean à Grenoble
--
Cet e-mail a été vérifié par le logiciel antivirus d'AVG.
www.avg.com
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000020119