ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re=3a Nom de fichier en langue =c3=a9trang=c3=a8re   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

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-browseforfolder

avec 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
20 058 messages dans le forum • Liste complète des messages

Publicité

Les pubs en cours :

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2023.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3