Board index » delphi » crHourGlass (newbie)

crHourGlass (newbie)

I want to change

When the user click the GO button, I put in the line
   cursor := crHourGlass;
Then proceed for some SQL command and then show another form.

But when I run it, the cursor change to an HourGlass briefly (like 0.5
second) and turn back to an arrow, which will be shown around 5 seconds
until the next form is shown.

What is the proper procedure??

 

Re:crHourGlass (newbie)


use this:

Screen.Cursor := crHourGlass

aelhk <ae...@aelhk.com> wrote in article
<MPG.f7a00908f907822989...@news.hk.super.net>...

Quote

> I want to change

> When the user click the GO button, I put in the line
>    cursor := crHourGlass;
> Then proceed for some SQL command and then show another form.

> But when I run it, the cursor change to an HourGlass briefly (like 0.5
> second) and turn back to an arrow, which will be shown around 5 seconds
> until the next form is shown.

> What is the proper procedure??

Re:crHourGlass (newbie)


In article <MPG.f7a00908f907822989...@news.hk.super.net>, aelhk
<ae...@aelhk.com> writes

Quote

>I want to change

>When the user click the GO button, I put in the line
>   cursor := crHourGlass;
>Then proceed for some SQL command and then show another form.

>But when I run it, the cursor change to an HourGlass briefly (like 0.5
>second) and turn back to an arrow, which will be shown around 5 seconds
>until the next form is shown.

>What is the proper procedure??

Maybe
  Screen.Cursor := crHourGlass;
would work.

If you take this approach, encase the whole thing in a block that
can cope with exceptions, or your app may get stuck with an hour
glass, e.g:

  procedure MyQuery;
  begin
    try
      Screen.Cursor := crHourGlass;
      {do your stuff here}
    finally
      Screen.Cursor := crDefault;
    end;
  end;

HTH
--
Jeremy Collins

Other Threads