[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'video' (#rtl)

SetVideoMode

Set current video mode.

Declaration

Source position: videoh.inc line 146

function SetVideoMode(

  const Mode: TVideoMode

):Boolean;

Description

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

GetVideoModeCount

  

Get the number of video modes supported by the driver.

GetVideoModeData

  

Get the specifications for a video mode

GetVideoMode

  

Return current video mode


Documentation generated on: May 14 2021