EPUB | CHM | PDF

Example: DisableControls, EnableControls, Eof

Top Previous Next

Usually DisableControls is called within the context of a try...finally block that re-enables the controls even if an exception occurs.

For example:

with CustMySQLTable do
begin
  DisableControls;
  try
    First;
    while not Eof do
    begin
     // Process each record here
     Next;
    end;
  finally
    EnableControls;
  end;
end;