Author Topic: A sort of FULLSCREEN  (Read 2711 times)

0 Members and 1 Guest are viewing this topic.

Offline bartok

  • Newbie
  • Posts: 80
    • View Profile
A sort of FULLSCREEN
« on: October 12, 2021, 08:48:37 am »
Hi,
in the attached image, the screen has the dimension of _DESKTOPWIDTH and _DESKTOPHEIGHT. But, due to the title bar "Untitled" and Windows's application bar,  the lower part of the image is not visible.
So, I ask if is there is a command in order to run the program with the indicated botton of the window already "pressed". I'm avoiding the use of _FULSCREEN.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: A sort of FULLSCREEN
« Reply #1 on: October 12, 2021, 09:23:31 am »
https://www.qb64.org/forum/index.php?topic=3659.msg130063#msg130063

Use the ScreenMove routine in the demo above.  It positions by program screen position and not window + border position.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: A sort of FULLSCREEN
« Reply #2 on: October 12, 2021, 10:30:45 am »
Borders? We don't need no stinking borders!

Code: QB64: [Select]
  1. '============
  2. 'NOBORDER.BAS
  3. '============
  4.     FUNCTION GetWindowLongA& (BYVAL hwnd AS LONG, BYVAL nIndex AS LONG)
  5.     FUNCTION SetWindowLongA& (BYVAL hwnd AS LONG, BYVAL nIndex AS LONG, BYVAL dwNewLong AS LONG)
  6.     FUNCTION SetWindowPos& (BYVAL hwnd AS LONG, BYVAL hWndInsertAfter AS LONG, BYVAL x AS LONG, BYVAL y AS LONG, BYVAL cx AS LONG, BYVAL cy AS LONG, BYVAL wFlags AS LONG)
  7. SCREEN _NEWIMAGE(600, 480, 32)
  8.  
  9. GWL_STYLE = -16
  10. ws_border = &H800000
  11. WS_VISIBLE = &H10000000
  12.  
  13. _TITLE "No Border"
  14.  
  15. winstyle2& = GetWindowLongA&(hwnd&, GWL_STYLE)
  16. winstyle& = -12582913
  17. a& = SetWindowLongA&(hwnd&, GWL_STYLE, winstyle& AND WS_VISIBLE) ' AND NOT WS_VSCROLL) ' AND NOT ws_border)
  18. a& = SetWindowPos&(hwnd&, 0, 0, 0, 0, 0, 39)
  19.  
  20. PRINT "Press any key to get back border...";: SLEEP
  21.  
  22. a& = SetWindowLongA&(hwnd&, GWL_STYLE, winstyle2& OR ws_border)
  23. a& = SetWindowPos&(hwnd&, 0, 0, 0, 0, 0, 39)
  24.  
  25.  

Of course, this only applies if you are running on a Windows Operating system. I'm running on a Windows 10 right now. Oops, have to go, someone downloaded a big pile of MicroSoft in my path.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/