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:
01481543
Views:
44
>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?

The name of the property is InitDir.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform