Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-02-23
4
Medium Priority
?
1,041 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
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.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

604 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