closeing a window?

BlitzPlus Forums/BlitzPlus Programming/closeing a window?

Mr_Plant(Posted 2003) [#1]
I have created a window to ask the user for some options.
I now want to close this window and enter a different
full screen graphics mode..

How do i remove the window - I can minimise it but is there not a way to close it completely??


Simon S(Posted 2003) [#2]
FreeGadget works, though I found no reference to that in the manual.


soja(Posted 2003) [#3]
That's the way I do it...


Mark Tiffany(Posted 2003) [#4]
Yup, FreeGadget will do the job perfectly. You see, the trick remembering that EVERYTHING is a gadget, INCLUDING windows. ;-) So all those lovely *Gadget* commands (like SetGadgetText) will work on windows too...and in fact on pretty much any gadget...


Pudsy(Posted 2003) [#5]
Me wonders what FreeGadget Desktop() does ;)


Mr_Plant(Posted 2003) [#6]
Thanks!


Simon S(Posted 2003) [#7]
Hmm, on a related topic, it seems HideGadget also closes a window permanently.

Any call to showgadget afterwards just loses the focus of the current window and nothing appears.

Is this correct behaviour? Doesn't seem like it.


Simon S(Posted 2003) [#8]
Studied it some more. Curiously I've no problem hiding the first window I create, and any that belong to it.

However any other window I create independant of the others is giving problems. More experimenting I think.


Kevin_(Posted 2003) [#9]
Try using setgadgetshape and move it off screen instead. Get the desktop height first then set the Windows Y position to the desktop Y position then just move it into place when you want it.

This is a solution I use and seems to work well.

Regards