Home > Back-end >  Can't click messagedlg pop up button
Can't click messagedlg pop up button

Time:09-25

Form1. MediaPlayer1. Open;
Form1. MediaPlayer1. Play;
If messagedlg (' of the suspicious vehicle. Please intercept ', mtWarning, [mbOk], 0)=id_ok then
The begin
Form1. MediaPlayer1. Close;
end;

CodePudding user response:

The parameter is wrong, changed to:
 
If messagedlg (' of the suspicious vehicle. Please intercept ', mtWarning, [mbOk], 0)=mrOK then

CodePudding user response:

reference 1st floor lyhoo163 response:
parameter is wrong, changed to:
 
If messagedlg (' of the suspicious vehicle. Please intercept ', mtWarning, [mbOk], 0)=mrOK then
instead mrOK is also the same problem

CodePudding user response:

 if messagedlg (' of the suspicious vehicle. Please intercept ', mtWarning, [mbOk], 0)=mrOK then 
ShowMessage (" AAA ");


Performed in the above code in D7 XE7 normal,

Analysis, we can reason:
1, messagedlg is call API, can your operating system, there is a problem,
2, MediaPlayer1. Play executed, a deadlock, messagedlg failed to perform in place,


Proposed a button, event execution alone, MessageDlg try, to find the reason,

CodePudding user response:

The
reference 3 floor lyhoo163 response:
 if messagedlg (' of the suspicious vehicle. Please intercept ', mtWarning, [mbOk], 0)=mrOK then 
ShowMessage (" AAA ");


Performed in the above code in D7 XE7 normal,

Analysis, we can reason:
1, messagedlg is call API, can your operating system, there is a problem,
2, MediaPlayer1. Play executed, a deadlock, messagedlg failed to perform in place,


Proposed a button, event execution alone, MessageDlg try, to find the reason,


I use the showmessage tried once, too, step through the discovery is the if statement is executed to the if messagedlg (' of the suspicious vehicle. Please intercept ', mtWarning, [mbOk], 0)=mrOK then later not to perform, and started back to the first line of the subroutine
 
Procedure TForm1. Button3Click (Sender: TObject);
The begin
ADOQuery2. Active:=false;
ADOQuery2. SQL. The Clear;
ADOQuery2. SQL. The Add (' select * from the car where the rfid='+' ' ' ' '+ CardNo);
ADOQuery2. Active:=true;
Ye:=ADOQuery2 fieldbyname (' ye '). AsString;
Ye2:=StrToFloatDef (ye, 0);
ADOQuery1. SQL. The Clear;
ADOQuery1. SQL. The Add (' select * from warning the where rfid='+' ' ' ' '+ CardNo);
ADOQuery1. Active:=true;
If ADOQuery1. RecordCount=1 then
The begin
//showmessage (' 123 ');
ADOQuery1. Active:=false;
Form1. MediaPlayer1. Open;
Form1. MediaPlayer1. Play;
If messagedlg (' of the suspicious vehicle. Please intercept ', mtWarning, [mbOk], 0)=mrOK then
The begin
Form1. MediaPlayer1. Close;
end;
If CardNo=rfid then
The begin
.
end;
End
The else
The begin
.
end;
end;

CodePudding user response:

1, will be:
Form1. MediaPlayer1. Open;
Form1. MediaPlayer1. Play;
Shielding, can try to perform,

2, will ADOQuery1
ADOQuery2
Shielding, can try to perform,

CodePudding user response:

There are two top window looks cause conflict
I usually use the Application. The MessageBox to the pop-up dialog
You try
Or use the ShowMessage

Should be able to solve the problem of the building
  • Related