Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2004-11

(no subject)

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Paul Davidson

OS X 10.3.6

This code makes a window area in center of screen, and prints in that area. The new window is filled with characters when DELLINE is used. Any hints?

program TestCRT;
    uses
      CRT;
    var
       f : text;
	procedure win( s : string );
	begin
         Window( 1, 3, ScreenWidth, ScreenHeight - 2 );
		GotoXY( 1, 1 );
		DelLine;
		Window( 1, 1, ScreenWidth, ScreenHeight );
		readln;
         GotoXY( 1, ScreenHeight - 2 );
         Write( f, s );
	end;
begin
	// Set up basic screen
	AssignCRT( f );
	Rewrite( f );
	// Make screen BLUE
	GotoXY( 1, 1 );
	TextBackground( Blue );
	ClrScr;
	// Middle window
	Window( 1, 3, ScreenWidth, ScreenHeight - 2 );
	GotoXY( 1, 1 );
	TextBackground( Cyan );
	ClrScr;
	// First message
	ClrScr;
	GotoXY( 1,ScreenHeight );
	TextColor( Blue );
	Window( 1, 1, ScreenWidth, ScreenHeight );
	GotoXY( 1, ScreenHeight - 2 );
	Write( f, 'Morning' );
     // Send some lines
	Win( 'Hello' );
	Win( 'This is a test ' );
	// Wait for human
	readln;
end.

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com