Mouse Outside Window

BlitzPlus Forums/BlitzPlus Programming/Mouse Outside Window

Mental Image(Posted 2004) [#1]
I have a GUI application, and before it runs proper I pop up a new window displaying the title image as follows:

Window_Title=CreateWindow("Title",200,200,602,352,0,0)
Gadget_Title_Canvas=CreateCanvas(0,0,602,352,Window_Title)
SetGadgetLayout Gadget_Title_Canvas,1,1,1,1

SetBuffer CanvasBuffer(Gadget_Title_Canvas)
DrawImage title_pic,0,0
FlipCanvas (gadget_Title_Canvas)

this_key=0
this_button=0
While (Not this_key) And (Not this_button)				;haven't pressed a key or clicked a mouse button
	this_key=GetKey()
	this_button=GetMouse()
Wend

FreeGadget Window_Title



The idea, of course, is that the title is displayed until the user presses any key on the keyboard or clicks a mouse button. It works fine if the pointer is over the window, but unfortunately if the use clicks the mouse buttons anywhere else on the desktop, the application is minimised.

Any ideas?