1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38:
| program project1; {$APPTYPE CONSOLE} uses Windows;
type GetConsoleDisplayMode = function(var lpModeFlags: DWORD): BOOL; stdcall; SetConsoleDisplayMode = function(hConsoleOutput: THandle;dwFlags: DWORD;var lpNewScreenBufferDimensions: COORD): BOOL; stdcall;
const Konsole_Vollbild = 1; Konsole_Fenster = 2;
var GetDisplayMode: GetConsoleDisplayMode = nil; SetDisplayMode: SetConsoleDisplayMode = nil; H_Kern:THandle; ConsMode: COORD; myCons: THandle;
procedure VollBild; begin H_Kern := GetModuleHandle('kernel32.dll'); if(H_Kern <> 0) then begin @GetDisplayMode := GetProcAddress(H_Kern, 'GetConsoleDisplayMode'); @SetDisplayMode := GetProcAddress(H_Kern, 'SetConsoleDisplayMode'); end; myCons:=GetStdHandle(STD_OUTPUT_HANDLE); SetDisplayMode(myCons, Konsole_Vollbild, ConsMode); end;
begin Vollbild; Write('Enter zum beenden drücken'); Readln; end. |