Solved

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

Posted on 2011-02-23
4
985 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-SSA
  • 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
 

Author Comment

by:Ed-SSA
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now