Solved

Can an OpenDialog option be set to enable selecting a hidden file?

Posted on 2011-02-23
4
1,002 Views
Last Modified: 2013-11-23
Is it possible to set an opendialog option to list hidden files, even if not turned on in Windows Folder Options setting?

I noticed that one of the options listed on the object inspector is: of ForceShowHidden - but it doesn't seem to do anything. Also, what is the syntax for setting opendialog options?

TIA,  Ed

0
Comment
Question by:Ed Covney
  • 3
4 Comments
 
LVL 24

Expert Comment

by:jimyX
ID: 34966583
ForceShowHidden responds to your system settings. If you set the OpenDialoge ForceShowHidden option to True and select "Show hidden files" under the "Windows Folder Options" then that shows the hidden files but not the system hidden files until you disable the option "Hide protected operating system files" then the OpenDialog shows all the files including all the hidden files.

What do you mean by the syntax of OpenDialog option?
You can select what suits you from the options.
0
 
LVL 24

Accepted Solution

by:
jimyX earned 500 total points
ID: 34966907
If you mean how to set the options then:

To exclude some options:
OpenDialog1.Options := OpenDialog1.Options - [ofReadOnly, ofForceShowHidden];

To include options:
OpenDialog1.Options := OpenDialog1.Options + [ofReadOnly, ofForceShowHidden];

To identify specific options:
OpenDialog1.Options := [ofReadOnly, ofForceShowHidden];
0
 
LVL 2

Author Comment

by:Ed Covney
ID: 34967088
JimyX -

>> ForceShowHidden responds to your system settings.

It doesn't appear to. If the system setting allows (ie Show Hidden files and folders), then that is always true no matter what Delphi option is set, ie opendialog always shows hidden files, no matter which way I set the option. Conversely, if not (ie Do Not Show Hidden files and folders), no matter what I do can allow showing a hidden file.  XP=pro, SP3, 100% up-to-date. Delphi 2010, update 4.

I'm beginning to think embarcadero forgot something here.

Thanks for the quick responce though.

0
 
LVL 24

Expert Comment

by:jimyX
ID: 34967316
This is what I said ForceShowHidden complies with your system settings.
I tried this in Delphi 7 and Delphi 2009 and I am sure it won't be different in Delphi 2010.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question