I
import
Unregistered / Unconfirmed
GUEST, unregistred user!
清除DOS控制台屏幕的过程。
procedure ClearScreen;
var
sbi : TConsoleScreenBufferInfo;
h: hwnd;
Cord:_COORD;
R:Cardinal;
begin
h:=GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(h,sbi);
Cord.X :=0;
Cord.Y :=0;
FillConsoleOutputCharacter(h,' ',sbi.dwSize.X * sbi.dwSize.Y,Cord,R);
SetConsoleCursorPosition(h,Cord);
end;
procedure ClearScreen;
var
sbi : TConsoleScreenBufferInfo;
h: hwnd;
Cord:_COORD;
R:Cardinal;
begin
h:=GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(h,sbi);
Cord.X :=0;
Cord.Y :=0;
FillConsoleOutputCharacter(h,' ',sbi.dwSize.X * sbi.dwSize.Y,Cord,R);
SetConsoleCursorPosition(h,Cord);
end;