I am querying remote database server via ODBC using ADO component.
When the query is taking a long time to finish, my application becoming not-responsive.
If you click something there, Windows will response "Not-responding".
Here is my code:
procedure TForm1.Button1Click(Sender: TObject);
ADOQuery1.CommandTimeout := 3600; // 1 hour
ADOQuery1.Active := TRUE;
// The result will be displayed in a DBGrid
My question, How to ignore all events or mouse clicks during this process so the "Not-responding" will not be displayed? But the application window should still be able to MOVE and MINIMIZE / MAXIMIZE ...
Further, I need to add a CANCEL button. How?