EnableGraphicalConsole()

Syntax

EnableGraphicalConsole(State)
Description
Changes the way the characters are drawn on the console between a graphical and a text-only mode.

Parameters

State If 'State' is 1, then console will be switched to graphical mode, else if 'State' is 0, it will switch back to text mode.

Return value

None.

Remarks

The default mode of the console is the text mode, which means the text can't be positioned anywhere in the console, but redirections (trough pipes) work correctly.

When being in the graphical mode, functions like ClearConsole() or ConsoleLocate() are available and the text can be positioned anywhere in the console screen, which allow to do console games or text only applications (which can be useful when accessed remotely trough telnet or ssh). The redirection (pipes) doesn't work correctly when being in graphical mode.

Example

  If OpenConsole()
    EnableGraphicalConsole(1)
    ConsoleLocate(7, 8)
    PrintN("Press return to exit")
    Input()
  EndIf

See Also

ConsoleLocate(), ConsoleColor(), ClearConsole()

Supported OS

Windows

<- ConsoleTitle() - Console Index - Inkey() ->