Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [Tutorial]How to close window at end of your program
Index -> Programming, Turing -> Turing Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
the_short1




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Preist_Holmes




PostPosted: Wed Jan 14, 2004 7:36 pm   Post subject: (No subject)

Thancks for the help.
Azzy




PostPosted: Mon Jan 19, 2004 5:39 pm   Post subject: (No subject)

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




PostPosted: Tue Jan 20, 2004 10:31 am   Post subject: (No subject)

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




PostPosted: Wed Jan 21, 2004 7:06 pm   Post subject: (No 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
shorthair




PostPosted: Thu Jan 22, 2004 2:17 pm   Post subject: (No subject)

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




PostPosted: Tue Feb 10, 2004 7:52 am   Post subject: (No 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
the_short1




PostPosted: Tue Feb 10, 2004 8:17 am   Post subject: (No 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
Sponsor
Sponsor
Sponsor
sponsor
jonos




PostPosted: Thu Feb 12, 2004 8:30 am   Post subject: (No 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?
programer007




PostPosted: Sun Mar 07, 2004 4:39 pm   Post subject: (No 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)
XeroX




PostPosted: Tue May 16, 2006 1:10 pm   Post subject: (No subject)

I know this is like 3 years old, but thanks. Very Happy
Display posts from previous:   
   Index -> Programming, Turing -> Turing Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 11 Posts ]
Jump to:   


Style:  
Search: