#include "FiveWin.ch"
static oWnd, buffer[ 25, 80 ]
function Main()
local oFont, nRow, nCol
for nRow = 1 to 25
for nCol = 1 to 80
buffer[ nRow, nCol ] = " "
next
next
DEFINE FONT oFont NAME "Courier New" SIZE 0, -12
DEFINE WINDOW oWnd TITLE "Terminal" COLOR "W+/B"
oWnd:SetFont( oFont )
Say( 5, 5, "Hello world!" )
Say( 10, 12, "A terminal emulator" )
ACTIVATE WINDOW oWnd ;
ON PAINT DumpText( oWnd )
return nil
function DumpText( oWnd )
local nRow, nCol
for nRow = 1 to 25
for nCol = 1 to 80
oWnd:Say( nRow, nCol, buffer[ nRow, nCol ] )
next
next
return nil
function Say( nRow, nCol, cText )
local n
for n = 1 to Len( cText )
buffer[ nRow, nCol + n - 1 ] = SubStr( cText, n, 1 )
next
oWnd:Refresh()
return nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 51 guests