
-----------------------------------
the_short1
Wed Jan 14, 2004 6:35 pm

[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  :D

-----------------------------------
Preist_Holmes
Wed Jan 14, 2004 7:36 pm


-----------------------------------
Thancks for the help.

-----------------------------------
Azzy
Mon Jan 19, 2004 5:39 pm


-----------------------------------
just to tell you.if the Window.Close is in a loop you need to exit it after the Window.Close

-----------------------------------
the_short1
Tue Jan 20, 2004 10:31 am


-----------------------------------
Yea this tip is for the END of your programs.... the last line.... ... yo mean exit the loop before Window.Close???

-----------------------------------
recneps
Wed Jan 21, 2004 7:06 pm


-----------------------------------
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

-----------------------------------
shorthair
Thu Jan 22, 2004 2:17 pm


-----------------------------------
Best way to exit a program is just make a quit button that closes the program and exits the loop

-----------------------------------
netninja
Tue Feb 10, 2004 7:52 am


-----------------------------------
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  :lol: 

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.  :)

-----------------------------------
the_short1
Tue Feb 10, 2004 8:17 am


-----------------------------------
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

-----------------------------------
jonos
Thu Feb 12, 2004 8:30 am


-----------------------------------
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?

-----------------------------------
programer007
Sun Mar 07, 2004 4:39 pm


-----------------------------------
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)

-----------------------------------
XeroX
Tue May 16, 2006 1:10 pm


-----------------------------------
I know this is like 3 years old, but thanks.  :D
