delphi執行查詢語句時的進度條怎麽做
阿新 • • 發佈:2019-02-27
sage orm erro ror error: delphi procedure begin message ProgressBar1.Max := MaxProgress;
end;
//ADOQuery的OnFetchComplete事件
procedure TForm1.ADOQuery1FetchComplete(DataSet: TCustomADODataSet; const Error: Error; var EventStatus: TEventStatus);
begin
ProgressBar1.Position := ProgressBar1.Max;
ShowMessage(‘OK‘);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ADOQuery1.ExecuteOptions := [eoAsyncFetch];//設為異步讀取
end;
//ADOQuery的OnFetchProgress事件
procedure TForm1.ADOQuery1FetchProgress(DataSet: TCustomADODataSet; Progress, MaxProgress: Integer; var EventStatus: TEventStatus);
begin
ProgressBar1.Position := Progress;
end;
//ADOQuery的OnFetchComplete事件
procedure TForm1.ADOQuery1FetchComplete(DataSet: TCustomADODataSet; const Error: Error; var EventStatus: TEventStatus);
begin
ProgressBar1.Position := ProgressBar1.Max;
ShowMessage(‘OK‘);
end;
delphi執行查詢語句時的進度條怎麽做