joyfack Posted December 18, 2020 Share Posted December 18, 2020 Please i'm usin MessageDlg to ask and make warning in my web application. But it not workin well. The instructions after se click of the user don't execute. if MessageDlg('Did you Need to save Data ?',mtConfirmation, [mbYes, mbNo] ) = mrYes then begin with DM.ADO_Enr_1 do begin close; SQL.Clear; SQL.Add('INSERT INTO Product (name, price) Values (:name,:price)'); Parameters.ParamByName('name').Value:= EdName.Text; Parameters.ParamByName('price').Value:= EdPrice.Text; ExecSQL; end; EdName.Clear; EdPrice.Clear; MessageDlg('Enregistrement réalisé avec succé',mtConfirmation,[mbok]); end else The block Begin ...... End is not execute. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 18, 2020 Administrators Share Posted December 18, 2020 Hi, You need to enable blocking mode or use non-blocking version: http://www.unigui.com/doc/online_help/api/uniGUIDialogs_MessageDlg@string@TMsgDlgType@TMsgDlgButtons.html http://www.unigui.com/doc/online_help/api/uniGUIDialogs_MessageDlg@string@TMsgDlgType@TMsgDlgButtons@TUniDialogCallBackAnonProc.html 1 Quote Link to comment Share on other sites More sharing options...
joyfack Posted December 18, 2020 Author Share Posted December 18, 2020 @Farshad Mohajeri Please how to enable blocking mode Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 18, 2020 Administrators Share Posted December 18, 2020 Just now, joyfack said: @Farshad Mohajeri Please how to enable blocking mode Please refer to links in my above post. Thanks 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted December 19, 2020 Share Posted December 19, 2020 MessageDlg(constCloseWindows, mtWarning, mbYesNo, CloseCallbackAnonProc); procedure TfmmParentSearchResults.CloseCallbackAnonProc(Sender: TComponent; Res: Integer); begin if Res = mrYes then begin ... ... end; end; 1 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.