; MouseY Example ; -------------- Graphics 640,480,0,2 SetBuffer BackBuffer() ; Hide the Windows pointer - the example draws its own crosshair HidePointer While Not KeyDown(1) Cls ; MouseY returns the pointer's y position on screen, ; from 0 to GraphicsHeight()-1 mx=MouseX() my=MouseY() ; Horizontal range-marker tracks the MouseY position Color 90,90,90 Line 0,my,639,my ; Shooting-range crosshair at the full mouse position Color 255,255,0 Oval mx-10,my-10,20,20,False Line mx-14,my,mx+14,my Line mx,my-14,mx,my+14 Color 255,255,255 Text 0,0,"Move the mouse up and down Esc: exit" Text 0,20,"MouseY() = "+my+" (0 to "+(GraphicsHeight()-1)+")" Flip Wend End