SetVideoMode function
Set current video mode.
Declaration
function SetVideoMode(const Mode: TVideoMode): BooleanDescription
SetVideoMode sets the video mode to the mode specified in
Mode:
If the call was successful, then the screen will have Col columns and
Row rows, and will be displaying in color if Color is
True.
The function returns True if the mode was set successfully, False
otherwise.
Note that the video mode may not always be set. E.g. a console on Linux or a telnet session cannot always set the mode. It is important to check the error value returned by this function if it was not successful.
The mode can be set when the video driver has not yet been initialized
(i.e. before InitVideo was called) In that case, the video mode will
be stored, and after the driver was initialized, an attempt will be made to
set the requested mode. Changing the video driver before the call to
InitVideo will clear the stored video mode.
To know which modes are valid, use the GetVideoModeCount and GetVideoModeData functions. To retrieve the current video mode, use the GetVideoMode procedure.
Errors
If the specified mode cannot be set, then
errVioNoSuchMode may be set
in
ErrorCode
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
