Computer Science Canada

[Tutorial]How to close window at end of your program

Author:  the_short1 [ Wed Jan 14, 2004 6:35 pm ]
Post subject:  [Tutorial]How to close window at end of your program

% Kevin Folz, AKA The_short1 @ Compsci.ca, September, 2003
% The name of this var doesn't matter, just needs to match at bottom
% Can also do multiple functions like, position and title etc.
% Search for View.Set in turing help files to find more functions..
% Place this variable on the first line of code as it also opens window
var iWindow : int := Window.Open ("graphics:450;540")
.....your program here.....
% at end of program Insert this line to close window
Window.Close (iWindow)

Enjoy Very Happy

Author:  Preist_Holmes [ Wed Jan 14, 2004 7:36 pm ]
Post subject: 

Thancks for the help.

Author:  Azzy [ Mon Jan 19, 2004 5:39 pm ]
Post subject: 

just to tell you.if the Window.Close is in a loop you need to exit it after the Window.Close

Author:  the_short1 [ Tue Jan 20, 2004 10:31 am ]
Post subject: 

Yea this tip is for the END of your programs.... the last line.... ... yo mean exit the loop before Window.Close???

Author:  recneps [ Wed Jan 21, 2004 7:06 pm ]
Post subject: 

Thats a very easy idea to understand, if you know how to open window, you know how to close it... but is there a way to close the standard run window after finishing? o.O

Author:  shorthair [ Thu Jan 22, 2004 2:17 pm ]
Post subject: 

Best way to exit a program is just make a quit button that closes the program and exits the loop

Author:  netninja [ Tue Feb 10, 2004 7:52 am ]
Post subject: 

Image Ready > Flag > 20 Frames > bend flag > add shadow

LoL, you didnt have to steal his flag, its shameful. Well, recneps stole his too right sooo, mehm w/e. I dont care, dont think any1 else does either. J/K, not shameful, everyone does it Laughing

Im trying to figure out how to make a button to close the window actually. More importantly, make an actual .exe program so it can be run on all computers. I tried the search tool but it seems it wasnt working for me yesterday, ill try again today. Smile

Author:  the_short1 [ Tue Feb 10, 2004 8:17 am ]
Post subject: 

This is of almost no use unless your running a .exe of a turing program....

Then it closes for you after you press the quit button (in game) or the game ends....

I used it for all my games so far.... and it realy adds that touch... since some REAL computer illiterates dont know what that pop up is for ("are u sure u want to halt")... Anyways.... this is a pretty old topic now i think...
Lets save it for questions concerning how to close...

A

Author:  jonos [ Thu Feb 12, 2004 8:30 am ]
Post subject: 

i was going to say that you could just use defWinID as the name because that is the default window name, but then i realized that that doesn't work. does anyone know why?

Author:  programer007 [ Sun Mar 07, 2004 4:39 pm ]
Post subject: 

wow.... i was wondering how to do that.... thanks a lot the short....

now people wont have to press the X at the top right to exit...

(when the program is done)

Author:  XeroX [ Tue May 16, 2006 1:10 pm ]
Post subject: 

I know this is like 3 years old, but thanks. Very Happy


: