delphi执行查询语句时的进度条怎么做
2017-11-15 · 知道合伙人互联网行家
关注
展开全部
delphi执行查询语句时的进度条怎么做
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;
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;
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;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询