From QB64 Wiki

Jump to: navigation, search

The $SCREENHIDE Metacommand can be used to hide the main program window throughout a program.



  • $SCREENHIDE may be used at the start of a program to hide the main program window when using a console window.
  • $SCREENHIDE must be used before the $SCREENSHOW Metacommand can be used!
  • The _SCREENHIDE statement must be used before _SCREENSHOW can be used in sections of a program.
  • QB64 Metacommands require that commenting or REM NOT be used!

Example: Hiding a program when displaying a message box in Windows.

$SCREENHIDE DECLARE DYNAMIC LIBRARY "user32" FUNCTION MessageBoxA& (BYVAL hWnd%&, BYVAL lpText%&, BYVAL lpCaption%&, BYVAL uType~&) END DECLARE DECLARE DYNAMIC LIBRARY "kernel32" SUB ExitProcess (BYVAL uExitCode~&) END DECLARE DIM s0 AS STRING DIM s1 AS STRING s0 = "Text" + CHR$(0) s1 = "Caption" + CHR$(0) ExitProcess MessageBoxA(0, _OFFSET(s0), _OFFSET(s1), 0)

Code by Michael Calkins

See also:

Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Talk for this IP
  • Log in
  • What links here
  • Related changes
  • Special pages
  • Printable version