Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Common Dialog Open File Initial Directory
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
01481542
Message ID:
01481564
Views:
43
The Common Dialog control does not have InitialDir property. The one you're looking for is InitDir.

>I'm trying to use the activex common dialog Open File dialog. Specifically I'd like to set the initial directory, but it doesn't seem to work:
>
>
>loComDialog = newobject("mscomdlg.commondialog")
>loComDialog.InitialDir = "c:\projects"
>loComDialog.Filter = "All Files (*.*)|*.*|Text Files(*.txt)|*.txt|Batch Files (*.bat)|*.bat"
>loComDialog.FilterIndex = 2
>loComDialog.MaxFileSize = 260 
>loComDialog.ShowOpen()
>lcFileName = loComDialog.FileName
>MESSAGEBOX(lcFileName)
>
>
>The folder c:\projects exists. Anyone know what's wrong?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform