1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-03 10:01:21 +00:00
qb64/internal/help/$SCREENHIDE.txt

38 lines
1.3 KiB
Plaintext
Raw Normal View History

2017-10-10 14:55:21 +00:00
The [[$SCREENHIDE]] [[Metacommand|metacommand]] can be used to hide the main program window throughout a program.
{{PageSyntax}}
2017-10-10 14:55:21 +00:00
: [[$SCREENHIDE]]
2017-10-10 14:55:21 +00:00
* $SCREENHIDE may be used at the start of a program to hide the main program window when using a [[$CONSOLE|console]] window.
* The [[_SCREENHIDE]] statement must be used before [[_SCREENSHOW]] can be used in sections of a program.
2017-10-10 14:55:21 +00:00
* '''QB64 [[Metacommand|metacommand]]s cannot be commented out with [[apostrophe]] or [[REM]]'''.
2017-10-10 14:55:21 +00:00
{{PageExamples}}
''Example:'' Hiding a program when displaying a message box in Windows.
{{CodeStart}} '' ''
{{Cl|$SCREENHIDE}}
2019-04-15 01:15:33 +00:00
{{Cl|DECLARE DYNAMIC LIBRARY}} "user32"
{{Cl|FUNCTION}} MessageBoxA& ({{Cl|BYVAL}} hWnd%&, {{Cl|BYVAL}} lpText%&, {{Cl|BYVAL}} lpCaption%&, {{Cl|BYVAL}} uType~&)
{{Cl|DECLARE LIBRARY|END DECLARE}}
2019-04-15 01:15:33 +00:00
{{Cl|DECLARE DYNAMIC LIBRARY}} "kernel32"
{{Cl|SUB}} ExitProcess ({{Cl|BYVAL}} uExitCode~&)
{{Cl|DECLARE LIBRARY|END DECLARE}}
{{Cl|DIM}} s0 {{Cl|AS}} {{Cl|STRING}}
{{Cl|DIM}} s1 {{Cl|AS}} {{Cl|STRING}}
2019-04-15 01:15:33 +00:00
s0 = "Text" + {{Cl|CHR$}}(0)
s1 = "Caption" + {{Cl|CHR$}}(0)
2021-01-24 03:36:34 +00:00
ExitProcess MessageBoxA(0, {{Cl|_OFFSET (function)|_OFFSET}}(s0), {{Cl|_OFFSET (function)|_OFFSET}}(s1), 0)
{{CodeEnd}}{{small|Code by Michael Calkins}}
2017-10-10 14:55:21 +00:00
{{PageSeeAlso}}
* [[$CONSOLE]], [[$SCREENSHOW]]
* [[_SCREENHIDE]], [[_SCREENSHOW]]
* [[_CONSOLE]]
2019-04-15 01:15:33 +00:00
{{PageNavigation}}