How to detect mouse out of window?

BlitzMax Forums/BlitzMax Programming/How to detect mouse out of window?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Graphics 640,480,0
Local here:String=""

While Not AppTerminate()
	PollEvent()
	Cls
	DrawText here,100,100
	Select CurrentEvent.ID
	
		Case EVENT_APPSUSPEND,EVENT_MOUSELEAVE

		here="MouseLeave"
		Case EVENT_MOUSEENTER
		here="MOuseEnter"
		Case EVENT_APPRESUME
		Case EVENT_APPTERMINATE

	End Select
	
	Flip
	
Wend

It seems to work for me