ShowMessage pop-up prompts sometimes don't show in the front (occasional), cause the software all the operation can't move, repeated twice by the combination of Alt + TAB key on the keyboard to switch from the window can show the prompt window again,
Delphi7 event code is as follows:
If CheckBox1. Checked then
The begin
ADOQueryTmp:=nil;
ADOQueryTmp:=TADOQuery. Create (ADOQueryTmp);
ADOQueryTmp. Connection:=DM1. ADOConnection1;
Dm1. ADOConnection1. BeginTrans;
Try
S_sql:='update spbm2 set kcje=KCSL * CBJJ';
ADOQueryTmp. Close;
With ADOQueryTmp do
The begin
SQL. The Clear;
SQL. The Add (s_sql);
ExecSQL;
end;
Except,
Dm1. ADOConnection1. RollbackTrans;
ADOQueryTmp. Close;
ADOQueryTmp. Free;
ShowMessage (' value failed! ');
exit;
end;
//end of the transaction
Dm1.ADOConnection1.Com mitTrans;
ADOQueryTmp. Close;
ADOQueryTmp. Free;
ShowMessage (' value calculation has been completed! ');
end;
CodePudding user response:
In front of the showmessage add one line Application. ProcessMessagesCodePudding user response:
Application. The MessageBox to try,