Solved

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

Posted on 2008-06-11
2
450 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
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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 NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

746 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

12 Experts available now in Live!

Get 1:1 Help Now