Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using variables
Message
From
08/10/1998 09:16:54
 
 
To
08/10/1998 09:04:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00144971
Message ID:
00144976
Views:
29
>I want to store a variable in a text box on a form as in a default path and have the user change it to a chosen path. I want to use this chosen path to set a default path and run some code. I would appreciate some ideas on this.

Look at the FAQ entry I posted earlier that describes using the Shell automation object to replace the GETDIR() function in VFP. The automation object uses the explorrer browser for directory selection and provides access to an edit box connected to the explorer browser if the appropriate BROWSEINFO flags are set (the revised version enables the edit box by setting the BIF_EDITBOX flag in the method call.) The SelDirDlg returns a path (or an empty string if no path is selected) without a trailing backslash; you could use the returned path in conjunction with SET DEFAULT TO.

You can expand the dialog to allow file selection by setting the BIF_BROWESEINCLUDEFILES flag in the third parameter of the Shell object's BrowseForFolder method invocation. The default flags set are BIF_RETURNONLYFSDIRS (blocks access to non-file system references), BIF_EDITBOX (provides an edit box in the dialog for the user to manually enter a path) and BIF_VALIDATE (require a valid path or cancellation of the dialog) if no value is passed in the third parameter of the function call.
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