Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getfile - Alternative Needed
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00182231
Message ID:
00182314
Views:
39
>I have a subdirectory and want to allow users to retrieve either a .bmp OR .gif file name similar to the getPic function call. I thought I read somewhere there is a better get file (activex maybe?) in vfp6? Currently I can't get it to go to the path I want without:
>
>cd graphics
>lcFile = getFile('bmp')
>cd ..
>
>I want:
>lcFile = getfile('bmp,gif', 'graphics') or similar
>where graphics is the subdirectory.
>

Robert, you might want to look at modifying the Enhanced GetDir() I posted in the FAQ, which is based on using the Shell.Application automation object; Shell.Application's BrowseForFolder method will allow the selection of files as well as folders by setting the BIF_BROWSEINCLUDEFILES value in the ulFlags argument (see the source for the values.) You can specify a starting folder with the RootFolder parameter. Play with the function I posted, if you have access to the MSDN, look at the Shell Object topic as a starting place.

To use the file selection option, you need to have at least version 4.71 of COMCTL32.DLL and SHELL32.DLL on the system, which are distributed with IE 4.

>Any help would be appreciated...
>Robert
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform