Hello,
After a long time, I have finally found the time and energy to work on an old project.
However, I've been stuck on the following problem for a while now, so I suspect I won't be able to solve it myself without help.
I have an application (Form1) with a form (Form2), which I call up as required.
The only problem is that confirming the dialog always closes Form2 too. It's as if the 'mrOK' is simply forwarded.
I didn't found anything online about this problem. So, where is my error?
Thanks !
Stefan
procedure TForm1.BtnDatabaseClick(Sender : TObject);
begin
Form2.ShowModal;
end;
There is some interaction in said form, e.g.
procedure TForm2.BtnTestConnectionClick(Sender : TObject);
var
pt : TPoint;
begin
With ZConnection2 do begin
[...]
try
Connected := True;
MessageDlgPos('Access - select database', mtInformation, [mbOk], 0, pt.X, pt.Y-80);
except
on E:Exception do begin
MessageDlgPos('Access failed !', mtError, [mbOk], 0, pt.X, pt.Y-80);
end;
end;
connected := False;
end;
end;