Category : BASIC Source Code
Archive   : QKWIN.ZIP
Filename : POPMENUH.BAS

 
Output of file : POPMENUH.BAS contained in archive : QKWIN.ZIP
'********************************************************************
'POPMENUH.BAS - A SAMPLE SCROLLABLE, HORIZONTAL MENU INSIDE A WINDOW
'********************************************************************
REM $DYNAMIC
DEFINT A-Z 'Make all variables integers by default.
DIM w(2000) 'Dimension an integer array for our window.
CALL QWINIT(4) 'Need to call this command before using any QW commands.
CLS 'Clear the screen.

DIM SHARED menu$(200) 'Define String array to hold menu items
style = 6 'Make menu border solid.
battr = &H12 'Set attribute for window border = Green on Blue.
cattr = &H17 'Set attribute for characters = White on Blue.
barattr = &H17 'Set attribute for bar on bottom of menu.
x1 = 15 'Left side of window.
x2 = 65 'Right side.
y1 = 6 'Top of window.
y2 = 16 '& Bottom.
options = 200 'Set # of items in menu = 200
position = 2 'Initial position of bar in menu = item 2
menuwidth = 15 'Set width of each item in the menu.

'---- Setup string array with menu items ----
FOR i = 0 TO options
menu$(i) = " 000000" + MID$(STR$(i), 2)
NEXT i


'---- Open Window for our menu ----
id = 1
CALL WOPEN(x1, y1, x2, y2, style, battr, "POPMENUH", w(), id)
CALL WCOLOR(id, cattr)

CALL POPMENUH(id, position, menuwidth, options, barattr, VARPTR(menu$(0)), result, flag)
LOCATE 1, 1
PRINT "Selected menu option: "; result, menu$(result), "Exit flag: "; flag; : END
END



  3 Responses to “Category : BASIC Source Code
Archive   : QKWIN.ZIP
Filename : POPMENUH.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/