Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Browsing network
Message
De
22/08/2001 06:07:11
 
 
À
22/08/2001 05:31:07
Daniel C.
InfoData Bacau
Bacau, Roumanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00547131
Message ID:
00547135
Vues:
11
Daniel,

From VFP6 you need to browse the shell namespace. You can do this in a number of ways depending on what you want to achieve.

1] Download the Shell Browsing ActiveX from the UT downloads section.

2] Use the Windows Scripting Host to get at the bits and pieces you need, for example an instance of the WScript.Network object will allow you enumarate your network drives and mappings in both a visual and non-visual way.

3] Use the code from Andrew Coates FoxTalk article (or his website below) to activate the shell namespace browser straight from VFP.
http://www.civilsolutions.com.au/publications.htm
From VFP7 you can use the enhanced GetDir() command which will use the shell namespace browser instead of its own dialog. Again the downside to this is that it gives you an interface for selection not a data structure for creating your own GUI.
*!* Displays the SHBrowseForFolder dialog if more than 2 parameters
*!* are present.
? getdir("c:\", "Text", "Caption")

*!* Displays the enhanced Windows 2000 dialog if more than 3 parameters
*!* are present.
? getdir("c:\", "Text", "Caption", 64)
HTH
Neil
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform