Solved

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

Posted on 2011-02-23
4
1,006 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 3

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

733 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