procedure TForm1.BitBtn1Click(Sender: TObject); begin Screen.cursor := crHourGlass; with ADOQuery1 do begin close; sql.text := 'select * from a'; open; end; end;procedure TForm1.ADOQuery1EndOfRecordset(DataSet: TCustomADODataSet; var MoreData: WordBool; var EventStatus: TEventStatus); begin Screen.cursor := crDefault; end;
var sc:TCursor; begin sc:=screen.cursor; try screen.cursor:=crhourglass; //查询 //... finally screen.cursor:=sc; end; end;
begin
Screen.cursor := crHourGlass;
with ADOQuery1 do
begin
close;
sql.text := 'select * from a';
open;
end;
end;procedure TForm1.ADOQuery1EndOfRecordset(DataSet: TCustomADODataSet;
var MoreData: WordBool; var EventStatus: TEventStatus);
begin
Screen.cursor := crDefault;
end;
sc:TCursor;
begin
sc:=screen.cursor;
try
screen.cursor:=crhourglass;
//查询
//...
finally
screen.cursor:=sc;
end;
end;
screen.Cursor:=crhourgrass;
查询完后变回:
screen.Cursor:=crDefault;
sc:TCursor;
begin
sc:=screen.cursor;
try
screen.cursor:=crhourglass;
//查询
//...
finally
screen.cursor:=sc;
end;
end;
支持
screen.cursor:=crdefault;