Solved

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

Posted on 2011-02-23
4
991 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to install eclipse SCADA on Linux Debian? 4 145
HTML-Kit Question 5 96
HTML/Webpage Editor for Windows 10 20 144
eclipse package explorer vs project explorer view 2 79
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…
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.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

911 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

21 Experts available now in Live!

Get 1:1 Help Now