Creating a screen without a title bar and positioning it on monitor
#2
Here's a start. Window without border example:

Code: (Select All)
DECLARE DYNAMIC LIBRARY "User32"
    FUNCTION GetWindowLongA& (BYVAL hwnd AS LONG, BYVAL nIndex AS LONG)
    FUNCTION SetWindowLongA& (BYVAL hwnd AS LONG, BYVAL nIndex AS LONG, BYVAL dwNewLong AS LONG)
    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)
END DECLARE
SCREEN _NEWIMAGE(600, 480, 32)
_DELAY .2

GWL_STYLE = -16
ws_border = &H800000
WS_VISIBLE = &H10000000

''WS_VSCROLL = &H200000

_TITLE "No Border"
hwnd& = _WINDOWHANDLE

winstyle2& = GetWindowLongA&(hwnd&, GWL_STYLE)
winstyle& = -12582913
a& = SetWindowLongA&(hwnd&, GWL_STYLE, winstyle& AND WS_VISIBLE) ' AND NOT WS_VSCROLL) ' AND NOT ws_border)
a& = SetWindowPos&(hwnd&, 0, 0, 0, 0, 0, 39)

PRINT "Press any key to get back border...";: SLEEP

'''winstyle& = GetWindowLongA&(hwnd&, GWL_STYLE)
a& = SetWindowLongA&(hwnd&, GWL_STYLE, winstyle2& OR ws_border)
a& = SetWindowPos&(hwnd&, 0, 0, 0, 0, 0, 39)

Pete
If eggs are brain food, Biden takes his scrambled.
Reply


Messages In This Thread
RE: Creating a screen without a title bar and positioning it on monitor - by Pete - 05-04-2022, 02:30 AM



Users browsing this thread: 1 Guest(s)