begin
VersionName := 'Button Menu Ver(1) 4/4/90 *CAB*'
lasthue := 0 <<* Color test variable *>>
<<**Start Comment**
Get User Area of Box ;;
Example: W;GR+/N;
**End Comment**>>
select all
<<* Get window parameters from BOX *>>
SELECT FIELDS ON fldtyp = 'B'
<<* ------------------------------------------- *>>
<<* Begin test of first box object & get info *>>
<<* Assumes the first box object is the window *>>
if fldtyp <> 'B'
WAIT 'No Box defined!! Generation terminated.'
HALT
endif
if upper(left(fldusr,1))<>'W'
WAIT 'First Box is not defined with the "W" flag! Generation terminated.'
HALT
endif
TopRowBox := fldrow
WindowBot := flddec <<* rows in the window including borders *>>
fuser := fldusr
<<* Get HighLite Color from User Area *>>
HighLite := GetUser(2,fuser)
if (HighLite="") or (HighLite="MAIN") <<* get field color from box object *>>
HighLite := AtrCode( fldatr )
endif
<<* End test of first box object & get info *>>
<<* ----------------------------------------- *>>
Tmp := 1
INITMENU('[ TARGET LANGUAGE ]')
'1. FoxPro':'Generate code for FoxPro.'
'2. FoxBase+':'Generate code for FoxBase+ Version 2.1'
END
MENU TO Tmp
if Tmp = 0
HALT
endif
FoxPro := (Tmp=1)
<<* WARNING - the follwing relies on the box obj located by the code
above, so do not use a SELECT ALL between them *>>
if FoxPro
ColOffset := fldcol
RowOffset := fldrow
else
ColOffset := 0
RowOffset := 0
endif
<<* Get Field Colors and the primary row *>>
MenuItems := 0
select all
forall fields <<* Count Menu Items *>>
temp := upper(left(fldusr,1))
if (temp$'BCMOE') and (temp<>'')
MenuItems := MenuItems +1
endif
endfor
#>>
<<*
*>-------------------------------------------------------------------<*
*> ***** USER AREA FLAGS TO ACTIVATE MENU CHOICES *****
*>
*> ;;;
*>
*> Check Box, with a 'w/r' Hot Button color, an initial value of true,
*> and an xBase prg call.
*> C;w/r;T;DO Gc_Tag
*>
*> Button Group 1 with the 2nd button set ON
*> B1;;
*> B1;;T;
*> B1;;
*>
*> Text Button for Normal exit
*> OK;;
*>
*> Text Button For Cancel Operation
*> ESC;;
*>
*> Text Button for Menu Action
*> M;;
*>
*>-------------------------------------------------------------------<*
*>>
#>>
<<* ====================================================================
xBASE PROGRAM START
====================================================================*>>
<<* The "program" label returns the current program filename being generated *>>
<>
<<*---Rebuild the program filename without the PATH---*>>
<>
* Program.: {prgname}
* Author..: {Author}
* Date....: {date}
* Notice..: Copyright (c) 1990, <>, All Rights Reserved
* Notes...: Template {VersionName}
<<# pragma
if FoxPro
genln('* Notes...: Target Language is FoxPro.')
else
genln('* Notes...: Target Language is FoxBase Version 2.1 .')
endif
genln('**** Debug *****')
genln('DO set_fox')
genln('DO mis_logo')
genln('**** Debug *****')
genln('** -- Save some of the calling environment')
if FoxPro
genln('ButtSch1=SCHEME(1) && SAVE Colors [FoxPro]')
genln('ButtSch2=SCHEME(2) && SAVE Colors [FoxPro]')
else
genln('SAVE SCREEN TO ButtScrn')
genln('ButtColor=SYS(2001,"COLOR") && SAVE Colors [Fox 2.1]')
genln('Null = SYS(2002) && Turn the cursor off [Fox 2.1]')
endif
#>>
** -- Declare private variables
PRIVATE ButRef,ButtColor,ButtScrn,cnt,ColorStr,LastColor
PRIVATE Mpt,MaxMpt,SayString
DIMENSION GroupFlag({MenuItems})
** Flag Groups as follows
** Value of 1 to n = Radio Button Groups
** Value of 0 = Check Box
** Value of -1 = Proceed Text Button
** Value of -2 = Abort Text Button
** Value of -3 = Menu Choice Text Button
<
3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code Archive   : BUTTON01.ZIP Filename : BUTTMAIN.INC ”
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/
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/