Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Michael
  Where is Paul Michael?
 Shelton
 Connecticut - United States
 Paul Michael
 To: chris smith
  Where is chris smith?
 Yorkshire CH CH
 Barbados
 chris smith
 Tags
Subject: RE: getdir()
Thread ID: 419 Message ID: 421 # Views: 4 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Tuesday, May 29, 2001 9:29:19 AM         
   


> When I issue the getdir() command the select directory dialog box appears .However the drive combo only allows me to select the a,c,d from my machine. How can I make the network neighborhood option included in this combo?
>
> smith

According to a reliable source (Cetin), try the following:

Declare integer GetActiveWindow in WIN32API
oShell = createobject("Shell.Application")
oFolder = oShell.BrowseForFolder(GetActiveWindow(), "Please Select folder", 0 )
? oFolder.Items.Item.Path

Try:
procedure getnetdir

lparameters inprompt

* Gets directory including those on a network
* Returns empty string if no selection made, name otherwise

if empty(inprompt)
inprompt = "Please Select folder"
endif

Declare integer GetActiveWindow in WIN32API
oShell = createobject("Shell.Application")
oFolder = oShell.BrowseForFolder(GetActiveWindow(), inprompt, 0 )

returnpath = ''

if (! isnull(oFolder)) and type('ofolder.items') = 'O'
returnpath = addbs(oFolder.Items.Item.Path)
endif

if ! directory(returnpath)
returnpath = ''
endif

return returnpath


Good luck.
PM

ENTIRE THREAD

getdir() Posted by chris smith @ 5/29/2001 8:40:19 AM
RE: getdir() Posted by Eric den Doop @ 5/29/2001 9:24:10 AM
RE: getdir() Posted by Paul Michael @ 5/29/2001 9:29:19 AM