Gustavo.deo Posted December 20, 2017 Share Posted December 20, 2017 When using MessageDlg, I need it to behave like a Free Form, which expects a user response on one of the buttons ... How do I ??? Note that I have already tried to see the messageDlg example, but it also does not have the behavior to wait for the response by the user Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 21, 2017 Share Posted December 21, 2017 Hi, Please, can you clarify your question, and which edition and build are you using ?! Best regards, Quote Link to comment Share on other sites More sharing options...
Gustavo.deo Posted December 21, 2017 Author Share Posted December 21, 2017 Hi, Please, can you clarify your question, and which edition and build are you using ?! Best regards, Sorry about my English!! Edition 1.0.0 build 1421. See the code sample below ... procedure TfTeste.DCallBack4 (Sender: TComponent; Res: Integer); begin ModalResult := Res; end; procedure TfTeste.APesquisarExecute (Sender: TObject); begin MessageDlg ('mbYesNo', mtConfirmation, mbYesNo, DCallBack4); // i need him to wait for the message to reply before proceding... if ModalResult = 1 then xxxxx else yyyyy; end; how to make??? Quote Link to comment Share on other sites More sharing options...
Ron Posted December 22, 2017 Share Posted December 22, 2017 procedure TfTeste.APesquisarExecute (Sender: TObject); begin case MessageDlg ('mbYesNo', mtConfirmation, mbYesNo) of mrYes: xxxx; mrNo: yyy; end; end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.