home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Press 1997 July
/
Sezamfile97_1.iso
/
msdos
/
clipper
/
c50xp300.a01
/
XPDEMO.ARJ
/
XPEGAVGA.PRG
< prev
next >
Wrap
Text File
|
1992-10-01
|
2KB
|
69 lines
* ------------------------------------------------------------------------
* Module......: XPEGAVGA.PRG
* Title.......: EGA/VGA 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 EGA/VGA functions
* See XPDEMO.RMK For Compile and Link instructions.
* ------------------------------------------------------------------------
#include "EXPAND.CH"
#include "INKEY.CH"
Function EGAtest()
Local lEga := XPegaThere()
if !lEga
XPalert('~EGA/VGA~ required',;
'This option requires that you have a ~EGA/VGA~ card installed!')
end
Return (lEGA)
Function FontStd()
if EGAtest()
if XPvgaThere()
XPvgaStdFont()
else
XPegaStdFont()
end
end
Return (NIL)
Function FontTest()
Field FONTNAME, FONTINFO, FONTDATA
if EGAtest()
if FontUsed()
XPmsg(' Load ~Font~ │ Select Font. ~Enter~-Loads, ~Esc~-Aborts')
XPedit(' ~EGA/VGA~ Fonts',;
' Font: Info:',{||' '+FONTNAME+' '+FONTINFO+' '},;
{|i|DoFont(i)})
USE
else
XPalert("Font File not Found!",;
"The File ~VGAFONTS.DBF~ or ~EGAFONTS.DBF~ was not found!;"+;
"You must place this file (depending on whether you have EGA or VGA);"+;
"in the directory where ~XPDEMO.EXE~ is located in order to use;"+;
"The EGA/VGA Font load part of this Demonstration program.")
end
end
Return (NIL)
Static Function FontUsed()
Local lRet := .f.
Local cFontFile := if(XPvgaThere(),"VGAFONTS.DBF","EGAFONTS.DBF")
if file(MyDrive()+cFontFile)
USE (MyDrive()+cFontFile) NEW READONLY
lRet := Used()
end
Return (lRet)
Static Function DoFont(i)
Field FONTDATA
if Lastkey()=K_ENTER
XPloadFont(0,FONTDATA,if(XPvgaThere(),16,14))
i := K_SPACE
else
i := Lastkey()
end
Return (i)