Was this helpful?
CursorBitmap Class
The CursorBitmap class represents an object that holds a small bitmap that can be controlled by a pointing device such as a mouse, trackball, or pen. In this section, the term “cursor” refers to the small bitmap picture and “mouse” refers to any pointing device. The location of the cursor on the screen changes with any mouse movement. At any given time, only one cursor can be associated with the mouse.
A CursorBitmap object can hold either a system cursor or a custom cursor but not both at the same time. A system cursor is one of a set of standard cursors that is provided by the windowing system and shared by all applications. A custom cursor is application specific and can be any small bitmap picture that the developer chooses to use. Using the inherited FileHandle attribute from BitmapObject, a custom cursor can be read in from a file that is in the Windows static monochrome cursor file format.
As the mouse is moved over a displayed FormField that has a CursorBitmap associated with it, the cursor changes to the one held by the CursorBitmap.
The following example demonstrates how to assign a custom cursor to a displayed FormField named ok_button:
initialize()=
declare
    hand_cursor = CursorBitmap;
enddeclare
begin
    hand_cursor.FileHandle = 'e:\cursors\hand.cur';
    field(ok_button).cursor = hand_cursor;
end
Another example shows how to display a busy cursor when the 4GL code is going to take a long time to execute:
intialize() =
declare
    busy_cursor = CursorBitmap;
enddeclare
begin
    busy_cursor.SysCursor = SP_WAIT;
    CurFrame.TopForm.Cursor = busy_cursor;
    /* 4GL that takes a long time to execute. */
    CurFrame.TopForm.Cursor = NULL;
end
Inherits From
Inherited By
None
Attributes
SysCursor
Methods
None
Last modified date: 06/25/2024