Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MESSAGE DIALOG BOX

Posted on 1998-01-12
2
Medium Priority
?
232 Views
Last Modified: 2010-04-04
I think this should be fairly easy although I am not sure.  I want to have a message dialog box appear everytime two check boxes are checked at the same time that tells the enduser that by doing this they could be restricting there search.  I have the dialog box however it comes up whether they have one, two, three or however many checkboxes checked.  How can I make this only happen when they have more than one checkbox checked at the same time?  Example would be appricated.  If this is more difficult than 25pts I am open to giving more for a good answer.
0
Comment
Question by:aj85
2 Comments
 
LVL 2

Accepted Solution

by:
mvz121697 earned 200 total points
ID: 1356215
procedure TForm1.Button1Click(Sender: TObject);
var n: integer;
begin
n:=0;
if CheckBox1.checked then Inc(n);
if CheckBox2.checked then Inc(n);
if CheckBox3.checked then Inc(n);
if n>1 then if MessageDlg('Your search is restricted, Continue ?'
  ,mtConfirmation, [mbYes, mbNo], 0) = mrYes then
  begin
       // do the search
  end;
end;

0
 

Author Comment

by:aj85
ID: 1356216
Thank you very much your answer was excellent!  I am increasing your points to 50.

Tony
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Integration Management Part 2
Suggested Courses

963 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