Topic: Message Dialog - Confirmation

Hello, how to create a confirmation box with Yes, no, and Cancel buttons with script?

Thanks

Post's attachments

Attachment icon Picture_MessageDlg_Confirmation_Delphi_XE2.png 22.03 kb, 479 downloads since 2014-09-12 

Re: Message Dialog - Confirmation

Hello )


// mbYes is 6
// mbNo is 7
// mbCancel is 2
if 6 = MessageDlg('Really?', mtConfirmation, mbYes + mbNo + mbCancel, 0) then 
   ShowMessage('Yes') 
   else ShowMessage('No');
Dmitry.

Re: Message Dialog - Confirmation

Sorry script below not yet work?

Pls, can you check and correct the script below for exit application.  Form1_Button7_click  ( action again for this project )
Thanks in advance, Carlo

//MessageDlg(Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer
//ShowMessage(Msg: Variant)
// mbYes is 6
// mbNo is 7
// mbCancel is 2
////if 6 = MessageDlg('Really?', mtConfirmation, mbYes + mbNo + mbCancel, 0) then
////   ShowMessage('Yes')
////  else ShowMessage('No');

//procedure Form1_Button7_Click (Sender: TObject);

//begin
        //  MessageDlg(Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer
//  if 6 = MessageDlg('Welcome to my Delphi application.  Exit now?',
  //  mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes then
// begin
//   Dialogs.MessageDlg('Exiting the Delphi application.', mtInformation,
//     [mbOk], 0, mbOk);
  //  Close;
//  end;
//end;

Re: Message Dialog - Confirmation

Please, send me project with this script to support@drive-software.com

Dmitry.

Re: Message Dialog - Confirmation

Hi, I add AC-Test_DEV01.7z file to my schared MVDB TestPerf dropbox folder. Thanks

Re: Message Dialog - Confirmation

I don't see this file in folder, please send me shared link.


Thanks.

Dmitry.

Re: Message Dialog - Confirmation

pls, try again. Thanks

Re: Message Dialog - Confirmation

I did it, replace script file in your project.

Post's attachments

Attachment icon script.pas 7.48 kb, 1070 downloads since 2014-09-15 

Dmitry.

Re: Message Dialog - Confirmation

Thanks, it works now.