sets the mouse shape and appearance.
DefMouse a%
a%:integer expression
The possible values are synonymous to the mouse pointer objects, as follows:
0 | Default | whatever is active will be used |
1 | Arrow | normal arrow |
2 | Cross | a little cross |
3 | IBeam | text cursor (looks like a big i with head line and under score) |
4 | Icon | don’t use, compatible Windows 3.1 icon |
5 | Size | general sizing exp. with the system menu (for windows) |
6 | SizeNESW | general sizing; double arrow from left down to upper right(cursor pointing northeast and southwest) |
7 | Size NS | general sizing; double arrow below to top (cursor pointing north and south) |
8 | Size NWSE | general sizing; double arrow from right down to upper left (cursor pointing northwest and southeast) |
9 | Size WE | general sizing, double arrow from right hand to left hand (cursor pointing west and east) |
10 | Up-Arrow | arrow up (cursor) |
11 | Hourglass | hourglass cursor |
12 | No Drop | prohibition sign (like under Windows explorer and copying: not allowed to place something there) |
13 | Arrow Hourglass | arrow with hourglass (cursor) |
14 | Help | arrow with question mark (help) |
15 | Size All | size all (cursor), four fold arrow |
98 | Cursor | Use the mouse set with the Form.MouseCursor property |
99 | Custom | Use the mouse set with the Form.MouseIcon property |
DefMouse 0 is the default.
It makes more sense to use the Form properties .MouseIcon or .MousePointer to set the mouse pointer for a form, window, or dialog. Rather than DefMouse 11, you would use Form.MousePointer = 11.
OpenW 1
Local mk%, mx%, my%
Do
Mouse mx%, my%, mk%
Exit If mk% = 2
/* quarter top left
If mx% <= _X / 2
If my% <= _Y / 2
DefMouse 2
/* mouse symbol = Cross
Else
/* quarter left down
DefMouse 3
/* mouse symbol = IBeam
EndIf
Else
/* quarter upper right
If my% <= _Y / 2
DefMouse 11
/* mouse symbol = hourglass
Else
/* quarter right down
DefMouse 10
/* mouse symbol = arrow up
EndIf
EndIf
Loop
CloseW 1
Mouse, MouseX, MouseY, MouseK, HideM, ShowM
{Created by Sjouke Hamstra; Last updated: 28/09/2014 by James Gaite}