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

Username:   Password: 
 RegisterRegister   
 how do i set commands for a button?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Stormtrooper




PostPosted: Thu Apr 10, 2003 12:41 pm   Post subject: how do i set commands for a button?

lets say i want to exit a programm and i want just to tap 1 key or something and it will exit how do i do that?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Apr 10, 2003 1:49 pm   Post subject: (No subject)

inside your loop you'll have

code:

if hasch then
getch(c)
end if


if any key is pressed, it will be recorded in variable c (type string(1)) Then if its something like "q" or something then you quit.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: