Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Menu
#11
1) Go into your QB IDE

2) Type "DO"

3) Press return

4) Press "up" once

5) Press "F1"

6) Repeat for IF and INKEY$

That should help ya Wink
Reply
#12
Hehe :lol: Reminds me of such a strange tutorial about how to use windows programs...

1) Click on the icon of the program you want to start. An icon is ................. you see on the left corner of the screen,.... no not that one. .... blablabla.

2) After you clicked, click again really fast so that you 'double-click'...

omg, I don't even want to complete it Wink
Reply
#13
Quote:Hehe :lol: Reminds me of such a strange tutorial about how to use windows programs...

1) Click on the icon of the program you want to start. An icon is ................. you see on the left corner of the screen,.... no not that one. .... blablabla.

2) After you clicked, click again really fast so that you 'double-click'...

Wow...I've never seen such a great tutorial....ADD IT TO THE FAQ,...,C'MON
:rotfl:
B 4 EVER
Reply
#14
1. Display the options on the screen
2. start a loop
3. get a letter from the keyboard, and save it into a string variable
4. if the string variable doesn't equal one of the options, keep looping

Hope that helps. I recommend looking up PRINT for displaying the options, DO and WHILE for the loop, and INPUT and INKEY$ for the letter input, and IF and INSTRING for the test of variable vs. options.

Good luck!

*peace*

Meg.

p.s. Zack, your running guy icon is really funny.
Reply
#15
I got sum code for u....
Code:
screen 0
do
locate 1,1:print "1. Opt1"
locate 2,1:print "2. Opt2"
locate 3,1:print "3. Opt3"
locate 4,1:print "4. Exit"
do
a$ = inkey$
if a$ = "1" then
locate 5,1:print "Action:Option1"
elseif a$ = "2" then
locate 5,1:print "Action:Option2"
elseif a$ = "3" then
locate 5,1:print "Action:Option3"
elseif a$ = "4" then
locate 5,1:print "Action:Exit"
end
end if
loop

or, if you want something more visually appealing:

Code:
screen 0

dim menu(1 to 4) as string

menu(1) = "Option 1"
menu(2) = "Option 2"
menu(3) = "Option 3"
menu(4) = "Exit"

opt = 1

do
a$ = inkey$
select case right$(a$,1)
  case "H"   'code for key up
   opt = opt - 1
   if opt<1 then opt = 4
  case "P"    'code for key down
   opt = opt+1
   if opt>4 then opt = 1
end select
for show = 1 to 4
if opt = show
  color 15,1
else
  color 15,0
end if
locate show,1:print menu(show)
next
if a$ = chr$(13) then   'enter key
if opt<4 then
locate 5,1:print "Action:Option"+opt
else
locate 5,1:print "Action:Exit"
end
end if
loop

And that is it.....e-mail me if you need an explaination
Reply
#16
Smile wow when i came up with the menu system thing i used the 'Opt' name too awwww how cool Big Grin

hey though about that prog, when you
Code:
PRINT "Action: Option" + Opt
, you'll get an error. Make it
Code:
PRINT "Action: Option" + STR$(Opt)

just though id clarify that for ya Smile btw meg rules listen to her or die in the dungeon hehehehe
Reply
#17
Quote:p.s. Zack, your running guy icon is really funny.
The Wolfenstein 3D dude - BJ Blazkowicz.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#18
Oh yeah? Wel I used currentChoice so nyah!

*stab*
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#19
agas code:

Code:
10 ? CurrentChoice
20 goto 48
30 ? "Jigga what"
a = a + 1
48 if a < 2 then goto 30
50 ? "Rold Gold"
if p = 3 then end
56 let p = 3: goto 50

hehhehe jk Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)