GetGlobalMouse ( ByRef x, ByRef y, ByRef mb1, ByRef mb2, ByRef mb3 )

Gets the absolute position of the mouse on the display and whether or not the mouse buttons are pressed.
Note: For mouse position in the window look at GetMouse


Example:

   my_window_mode = WindowMode(1,0,1,0,0)
   WindowOpen ( 0, "My App", WINDOWPOS_CENTERED, WINDOWPOS_CENTERED, 640, 480, my_window_mode, 1 )
   Dim x, y, mb1, mb2, mb3
   While WindowExists( 0 )
   GetGlobalMouse ( x, y, mb1, mb2, mb3 )
   Print "Mouse position is "; x; ","; y
   Update()
   Wend

This will open a 640 x 480 window and keep printing the global mouse position until the window is closed.