Name
DrawConsoleBorder -- draw border to console (V10.0)
Synopsis
DrawConsoleBorder([ls, rs, ts, bs, tl, tr, bl, br])
Platforms
Linux, macOS, Windows

Function
This function draws a border around the edge of the current console window. All arguments must be character codes that specify the character that should be put at the respective position. The ls parameter specifies the character to be drawn at the left side of the border, rs specifies the right side of the border, ts the top side and bs the bottom side. The tl parameter specifies the character to be drawn in the top left corner of the border, tr specifies the top right corner of the border, bl the bottom left corner and br the bottom right corner. If a parameter is 0, DrawConsoleBorder() 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
ls
optional: character for left side of border (defaults to 0)
rs
optional: character for right side of border (defaults to 0)
ts
optional: character for top side of border (defaults to 0)
bs
optional: character for bottom side of border (defaults to 0)
tl
optional: character for top left corner of border (defaults to 0)
tr
optional: character for top right corner of border (defaults to 0)
bl
optional: character for bottom left corner of border (defaults to 0)
br
optional: character for bottom right corner of border (defaults to 0)
Example
EnableAdvancedConsole()
DrawConsoleBorder()
RefreshConsole()
The code above draws a border using the default characters around the current console window.

Show TOC