help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions][Variables] Reference for unit 'video' (#rtl)

ClearScreen

Clear the video screen.

Declaration

Source position: videoh.inc line 132

procedure ClearScreen;

Description

ClearScreen clears the entire screen, and calls UpdateScreen after that. This is done by writing spaces to all character cells of the video buffer in the default color (lightgray on black, color attribute \$07).

Errors

None.

See also

InitVideo

  

Initialize video driver.

UpdateScreen

  

Update physical screen with internal screen image.

Example

program testvideo;

uses video,keyboard,vidutil;

Var
  i : longint;
  k : TkeyEvent;

begin
  InitVideo;
  InitKeyboard;
  For I:=1 to 10 do
    TextOut(i,i, 'Press any key to clear screen');
  UpdateScreen(false);
  K:=GetKeyEvent;
  ClearScreen;
  TextOut(1,1,'Cleared screen. Press any key to end');
  UpdateScreen(true);
  K:=GetKeyEvent;
  DoneKeyBoard;
  DoneVideo;
end.  

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505