FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

MOUSE

Set the mouse position


LOCAL FN SetMouse(where&)
  CALL LOCALTOGLOBAL(where&)
  POKE LONG _RawMouse, where&
  POKE LONG _MTemp, where&
  POKE WORD _CrsrNew, &FFFF
END FN

'Set the mouse to (0,0) within the window:
WINDOW 1
DIM thePt.4
CALL SETPT(thePt, 0, 0)
where&;4 = @thePt
FN SetMouse(where&)
DO
  HANDLEEVENTS
UNTIL _false

Rick


Try this for moving the location of the cursor

Dim h,v
h = 100
v = 200 ' set some coordinate
BLOCKMOVE @h,_mtemp,4 'move coord to temp and raw
BLOCKMOVE @h,_rawmouse,4
Poke(_crsrnew),-1 'force redraw

David