Language:
Русский
English
{Getgrfmd.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the GetGraphMode function.}
uses Graph;
var
Gd, Gm: Integer;
Mode: Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, '');
if GraphResult <> grOk then
Halt(1);
OutText('<ENTER> to leave graphics:');
Readln;
RestoreCrtMode;
Writeln('Now in text mode');
Write('<ENTER> to enter graphics mode:');
Readln;
SetGraphMode(GetGraphMode);
OutTextXY(0, 0, 'Back in graphics mode');
OutTextXY(0, TextHeight('H'), '<ENTER> to quit:');
Readln;
CloseGraph;
end.