Close ScrenRes without ending program
-
- Posts: 19
- Joined: Mar 06, 2023 2:07
- Location: Arizona
- Contact:
Close ScrenRes without ending program
What's the proper way to close a ScreenRes graphics window without ending the program?
Re: Close ScrenRes without ending program
Code: Select all
Screen 0
Otherwise (from SCREEN (GRAPHICS)):
Note on using Screen 0
Screen 0 closes any graphics window, but also clears the console window if it exists.
Screen 0, , , GFX_SCREEN_EXIT (with GFX_SCREEN_EXIT=&h80000000) also closes any graphics window, but does not clear the console window if it exists (previous text is preserved).
-
- Posts: 19
- Joined: Mar 06, 2023 2:07
- Location: Arizona
- Contact:
Re: Close ScrenRes without ending program
Thank you.
That part about preserving the text will be handy.
That part about preserving the text will be handy.
Re: Close ScrenRes without ending program
Moreover, this does not modify the previous configuration of the console window.
-
- Posts: 131
- Joined: Feb 11, 2013 12:23
Re: Close ScrenRes without ending program
You can use both, console and screen at same time:
Code: Select all
screenres 320,240
print "Click the console"
Dim a As String
Open Cons For Output As #1
Open Cons For Input As #2
Print #1,"Please write something and press ENTER"
Line Input #2,a
Print #1, "You wrote";a
Print #1, "Now click back to your screen - nothing more happens here ";a
print "YEP THIS WORKES SURE:";a
Close #1
Close #2
Sleep
print
-
- Posts: 19
- Joined: Mar 06, 2023 2:07
- Location: Arizona
- Contact:
Re: Close ScrenRes without ending program
Thant's awesome. I was wondering how to do that.
Thanks for sharing!
Thanks for sharing!