Solved

How to get the value of "Open as read only" Checkbox in Open dialog box?

Posted on 2008-06-11
2
461 Views
Last Modified: 2013-11-23
Hi,
I am using Open Dialog control of Delphi 6. I have to Processed the files selected from the dialogbox. But have to check the Checkbox is checked or not. Acording to the state of the checkbox("Open as Read only") I have to further process the files.
I have attached the image for your reference.
I have tried
IsDlgButtonChecked(odialog.Handle,chx1);
CheckDlgButton functions but not able to do it.
I am getting Handle always 0.
Please I need help.
ReadOnly.JPG
0
Comment
Question by:mananhshah
[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
2 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 125 total points
ID: 21760583
The option flags get updated when the TOpenDialog execute is finished, so just check for ofReadOnly.

Eg:

  if OpenDialog.Execute then
  begin
     if (ofReadOnly in OpenDialog.Options) then
     begin
        ShowMessage('Open as read-only is checked');
     end;
  end;

---

Regards,
Russell

0
 

Author Closing Comment

by:mananhshah
ID: 31466070
Thanks for your answer
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

728 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