DELPHI中 screen.Cursor:=crhourglass; adoQuery.close; adoquery.Open; screen.Cursor:=crdefault;啥意思

Mouse busy 
this code is probably used to demonstrate the usage of the mouse. Details are as follows:

to make the mouse pointer as an hourglass shape. (To indicate the program is busy)
screen.Cursor: = crhourglass;

the (open) database is closed.
adoQuery.close; (personally I think that this change better: if adoQuery.Active then adoAuery.close;)

to open the database.
adoquery.Open;

the mouse pointer is restored to the default state.
screen.Cursor: = crdefault;

if you use the program, with the following code suggestion:

screen.Cursor: = crhourglass;

IF adoQuery.Active the then
adoAuery.close;

the try
adoquery.Open;
a finally
screen.Cursor: = crdefault;
End;

Guess you like

Origin www.cnblogs.com/jijm123/p/11444565.html