home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Press 1997 July
/
Sezamfile97_1.iso
/
msdos
/
clipper
/
c50xp300.a01
/
XPDEMO.ARJ
/
XPUTIL.PRG
< prev
Wrap
Text File
|
1992-10-01
|
2KB
|
102 lines
* ------------------------------------------------------------------------
* Module......: XPUTIL.PRG
* Title.......: UTIL 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
* Some general Util functions
* See XPDEMO.RMK For Compile and Link instructions.
* ------------------------------------------------------------------------
#include "EXPAND.CH"
Function nTrim(s)
Return AllTrim(Str(s))
Function PCXname()
Return (Left(XPmyname(),Len(XPmyName())-3)+'PCX')
Function MyDrive()
Return Left(XPmyName(),2)
Function notYet()
XPalert("Sorry..",;
"I'm ~so~ Sorry, but I haven't had the time to implement this part;"+;
"of the ~Expand Library~ Demonstration program..;Better next time!")
Return (NIL)
Function About()
XPalert('About..',';This is the Demonstration program for the;;'+;
[~Expand Library v3.00~, Released August 1992;;]+;
'This program is written in ~Clipper 5.01~ using the named Library.;'+;
'Copyright (c)1992 by ~Softwarebureau Pepijn Smits~;'+;
'Written by Pepijn Smits')
Return (NIL)
Function XPinfo()
XPalert('Information about the makers of the ~Expand~ Library',;
';The ~Expand Library~ was written by Pepijn Smits and he can be reached at;;'+;
'Sophiastraat 8;'+;
'3061 LT Rotterdam;'+;
'The Netherlands;'+;
'Tel : +31-10-2120589;'+;
'Fax : +31-10-2121205')
Return (NIL)
Function XPstop()
if XPask('Quit','Are you sure you want to ~Quit~?')
set color to
@ MaxRow(),0
quit
end
Return (NIL)
Function TypeRate()
Local i := XPalert('Typematic ~Rate~ Set',;
'Set the ~Delay~ before repeat to',;
{"¼s","½s","1s"},2)
Local j := 0
if i<>0
j := XPalert('Typematic ~Rate~ Set',;
'Set the ~Repeat~ rate to:',;
{"~2~ cps","~5~ cps","~10~ cps","~20~ cps","~30~ cps"},3)
end
if i=0 .or. j=0
Return (NIL)
end
if (i = 2)
i := 1
elseif (i = 1)
i := 0
else
i := 3
endif
do case
case (j = 0) .or. (j = 3)
j := CPS10
case (j = 1)
j := CPS2
case (j = 2)
j := CPS5
case (j = 4)
j := CPS20
case (j = 5)
j := CPS30
endcase
XPkeySpeed(i,j)
Return (NIL)
Function Prompt(cTitle,cText,Default)
Local x
XPpushScr()
Default := Padr(Default,58)
XPbox2(9,9,12,71,cTitle)
@ 10,11 say cText
x := XPmouseGet(11,11,Default)
XPpopScr()
Return Alltrim(x)