From QB64 Wiki

Jump to: navigation, search

The _CONSOLE statement can be used to turn OFF a console window or turn it on after it has been OFF.



  • _CONSOLE OFF or ON must be used after the $CONSOLE Metacommand has established that a console window is desired.
  • _CONSOLE OFF turns the console window off once a console has been established using $CONSOLE.
  • _CONSOLE ON should only be used AFTER the console window has been turned OFF previously.
  • _DEST _CONSOLE can be used to send screen output to the console window using QB64 commands such as PRINT.
  • _SCREENHIDE or _SCREENSHOW can be used to hide or display the main program window.
  • The $SCREENHIDE Metacommand can hide the main program window throughout a program when only the console is used.

Example: Hiding and displaying a console window. Use _DELAY to place console in front of main program window.

$CONSOLE _CONSOLE OFF 'close original console _DELAY 2 _CONSOLE ON 'place console above program window _DEST _CONSOLE INPUT "Enter your name: ", nme$ 'get program input _CONSOLE OFF 'close console _DEST 0 'destination program window PRINT nme$ END

Explanation: The destination must be changed with _DEST _CONSOLE to get INPUT from the $CONSOLE screen.

See also:

Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page
Personal tools