Computer Science Canada 1 More thing! |
Author: | countergary [ 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! ![]() |
Author: | cool dude [ Tue Jan 25, 2005 6:25 pm ] |
Post 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. |
Author: | countergary [ Tue Jan 25, 2005 6:40 pm ] |
Post 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 ![]() |
Author: | Bacchus [ Tue Jan 25, 2005 7:32 pm ] |
Post 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 |
Author: | cycro1234 [ Tue Jan 25, 2005 7:35 pm ] |
Post 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. |
Author: | ste_louis26 [ Wed Jan 26, 2005 12:07 pm ] | ||||||
Post subject: | |||||||
do you have mainMenu in procedures? it's just
if mainMenu is declared after this and you can't call it in a procedure then just
and
|
Author: | cycro1234 [ Wed Jan 26, 2005 2:06 pm ] |
Post subject: | |
loop exit when hasch end loop Window.Close (window name here) |
Author: | person [ Wed Jan 26, 2005 6:42 pm ] |
Post subject: | |
getch could also work |
Author: | MysticVegeta [ 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! ![]() 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 |