Just A Little Help

Blitz3D Forums/Blitz3D Beginners Area/Just A Little Help

Could someone tell me the code I would use to make it so that if you clicked on an image, it would, for instance, end the program? Thanks.

Graphics 800,600
SetBuffer BackBuffer()

img = LoadImage("image.bmp")

While Not KeyDown(1)
	DrawImage img,100,100
	If ImageRectCollide(img,100,100,MouseX(),MouseY(),1,1) And MouseDown(1)
		End
	EndIf
Wend


thanks.