How to close a BlitzMAX window ?

BlitzMax Forums/BlitzMax Beginners Area/How to close a BlitzMAX window ?

semar(Posted 2006) [#1]
Hi,
in a BMAX window application, if I click with the mouse on the [X] button, which is present at the top-right corner of the window self, the window does not close as usually.

With ALT+F4 works, but I wonder, is there any way to close it using the mouse on that [X] button ?

Am I missing something obvious ?

Thanks,
Sergio.


tonyg(Posted 2006) [#2]
appterminate()


semar(Posted 2006) [#3]
appterminate()

I don't get it. How should I use appterminate() ? The problem is, clicking on the [X] does not close the window.

??


Bremer(Posted 2006) [#4]
I think you need to catch the event that someone click on the X button and then do appterminate()


tonyg(Posted 2006) [#5]
... maybe checking the example that comes with appterminate() would help...
Graphics 640,480,0

While Not AppTerminate() Or Not Confirm( "Terminate?" )

	Cls
	DrawText MouseX()+","+MouseY(),0,0
	Flip

Wend



semar(Posted 2006) [#6]
Thank you !

... maybe checking the example that comes with appterminate() would help...

Argh ! Hem.. yes, you're definately right !!!

:)

Sergio.