home *** CD-ROM | disk | FTP | other *** search
- * ------------------------------------------------------------------------
- * Module......: XPMAIN.PRG
- * Title.......: MAIN part of the Expand Library Demonstration Program
- * Author......: Pepijn Smits.
- * Date........: July/August 1992
- * Copyright...: (c)1992 by Softwarebureau Pepijn Smits
- * Notes.......: Clipper 5.01 Demo of the Expand Library
- * Contains the Main() procedure, which is called at startup..
- * See XPDEMO.RMK For Compile and Link instructions.
- * ------------------------------------------------------------------------
-
- Procedure Main()
- SetCancel(.f.)
- XPmouseSet(.t.)
- InitScreen()
- SetupScreen()
- SetupMenu()
- SetCursor(0)
-
- // Install Our Inkey Hander
- XPinkeyBlock( {|n|XPdemoInkey(n)}, {||XPdemoInkey()})
-
- // Go into the Menu Loop
- while .t.
- MenuColor()
- Eval(XPpullMenu())
- end
- Return
-
- Procedure SetupScreen
- Local i
- MenuColor()
- DispBox(0,0,MaxRow(),MaxCol(),Replicate('░',9))
- /* Make a nice banner in the background */
- for i := 1 to 8
- @ i+3 , 8 say StrTran(XPbanner(i," Expand "),' ','░')
- @ i+12 , 8 say StrTran(XPbanner(i,"Library!"),' ','░')
- next
- Return
-
- Procedure InitScreen
- Local vMode := XPvmode()
- if XPfastPCX(PCXname())==0
- XPmouseKey()
- XPvmode(vMode)
- end
- Return
-