Home Articles Books Downloads FAQs Tips

Q: Replace the SQL hour glass cursor with the regular hour glass cursor


Answer

The stock cursors provided by the VCL are available at runtime in the Cursors array property of the global Screen object. The array is indexed via the cursor constants provided by the VCL (crNone, crHourGlass, etc). If you want to change one of the stock cursors, simply assign a new value to this array.

The following code example demonstrates how to replace the SQL cursor with the regular hourglass cursor.

__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
    Screen->Cursors[crSQLWait] = Screen->Cursors[crHourGlass];
}


Copyright © 1997-2000 by Harold Howe.
All rights reserved.