Returns the maximum mode number for the currently loaded driver.
function GetMaxMode: Integer;
The return value is the maximum value that can be passed to SetGraphMode.
GetMaxMode lets you find out the maximum mode number for the current driver, directly from the driver. (Formerly, GetModeRange was the only way you could get this number; GetModeRange is still supported, but only for the Borland drivers.)
The value returned by GetMaxMode is the maximum value that might be passed to SetGraphMode. Every driver supports modes 0..GetMaxMode.
Must be in graphics mode.