Home > Back-end >  About ShowMessage pop-up window does not appear in the front
About ShowMessage pop-up window does not appear in the front

Time:11-04

Excuse me, what a great teacher met such a question?
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. ProcessMessages

CodePudding user response:

Application. The MessageBox to try,
  • Related