Name
DrawConsoleBox -- draw box to console (V10.0)
Synopsis
DrawConsoleBox([xc, yc])
Library
console

Platforms
Linux, macOS, Windows

Function
This function draws a box around the edge of the current console window. The xc and yc arguments must be character codes that specify the character that should be used for the horizontal and vertical frames. If a parameter is 0, DrawConsoleBox() will use its default character for the specified border position.

Characters must be passed as numeric values, not as strings. For normal characters this value is simply the Unicode codepoint of the respective character, e.g. 65 for 'A'. You can, however, also pass a special character code composed by the MakeConsoleChr() function. This function allows you to merge text formatting styles into the character code and it also supports special character codes like arrows or border pieces. See MakeConsoleChr for details.

You must enable advanced console mode using EnableAdvancedConsole() before you can use this function. See EnableAdvancedConsole for details.

Inputs
xc
optional: character for horizontal frame (defaults to 0)
yc
optional: character for vertical frame (defaults 0)
Example
EnableAdvancedConsole()
DrawConsoleBox()
RefreshConsole()
The code above draws a box using the default characters around the current console window.

Show TOC