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

Username:   Password: 
 RegisterRegister   
 1 More thing!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
countergary




PostPosted: Tue Jan 25, 2005 6:08 pm   Post subject: 1 More thing!

Hey guys, sorry but I forgot to ask you, could someone tell me how to go back to the main page by pressing a single key if your on another page?

ex. Please press r to go back to the main page!!

then you gota press r and it will go to the main page!


Thanks! Very Happy
Sponsor
Sponsor
Sponsor
sponsor
cool dude




PostPosted: Tue Jan 25, 2005 6:25 pm   Post subject: (No subject)

i'm not sure wat u r asking but if i know then just press the home button under where it says compsci.ca at the top of the page.
countergary




PostPosted: Tue Jan 25, 2005 6:40 pm   Post subject: (No subject)

Wut I meant was, When I open my program and I open a page, how do I go back to the mane page in my program.

ex "press r to go back to main page" then if you press r in goes back!


btw thanks for helping me with the tutorial Very Happy
Bacchus




PostPosted: Tue Jan 25, 2005 7:32 pm   Post subject: (No subject)

[code]var chars :array char of boolean

Input.KetDown(chars)
if chars ('r') then
%goto main bit here
end if
[code] you can also use getch/get or key down
cycro1234




PostPosted: Tue Jan 25, 2005 7:35 pm   Post subject: (No subject)

Or, you could add a button on the page. That is, create a GUI button full and then make the shortcut ctrl r. And then link the button to the main menu procedure.
ste_louis26




PostPosted: Wed Jan 26, 2005 12:07 pm   Post subject: (No subject)

do you have mainMenu in procedures?
it's just
code:

put "blah blah blah "..
getch (key)
mainMenu   %procedure



if mainMenu is declared after this and you can't call it in a procedure then

just
code:

forward proc mainMenu

and
code:

body procedure mainMenu
[/code]
cycro1234




PostPosted: Wed Jan 26, 2005 2:06 pm   Post subject: (No subject)

loop
exit when hasch
end loop
Window.Close (window name here)
person




PostPosted: Wed Jan 26, 2005 6:42 pm   Post subject: (No subject)

getch could also work
Sponsor
Sponsor
Sponsor
sponsor
MysticVegeta




PostPosted: Wed Jan 26, 2005 6:50 pm   Post subject: Re: 1 More thing!

countergary wrote:
Hey guys, sorry but I forgot to ask you, could someone tell me how to go back to the main page by pressing a single key if your on another page?

ex. Please press r to go back to the main page!!

then you gota press r and it will go to the main page!


Thanks! Very Happy

var key : string (1)
forward proc ends

proc main
cls
put "The prog starts"
put "Press any key to exit"
loop
exit when hasch
end loop
ends
end main

body proc ends
cls
put "Press any key to go back to the beginning"
loop
getch (key)
if key = 'r' then
exit
end if
end loop
main
end ends

main
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  [ 9 Posts ]
Jump to:   


Style:  
Search: