CONST HWND_TOPMOST%&
= -1 CONST SWP_SHOWWINDOW%&
= &H40
GWL_STYLE = -16
ws_border = &H800000
WS_VISIBLE = &H10000000
Level = 175
SetWindowOpacity hwnd, Level
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)
msg$ = "Welcome to Translucent Windows Without Borders!"
i = 16
COLOR &HFFFFFFFF, &H0 ' white foreground, transparent background FGwin& = GetForegroundWindow&
IF hwnd
<> FGwin&
THEN ' QB64 no longer in focus. a& = SetWindowPos&(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE + SWP_SHOWWINDOW)
PSET (x
, 480 - y
), _RGB(y
/ 2 MOD 256, 100, 200) ' (x MOD 512 XOR y) MOD 256, y MOD 256) i = i + 1
CONST WS_EX_LAYERED
= &H80000 Msg = GetWindowLongA&(hwnd, G)
Msg
= Msg
OR WS_EX_LAYERED
action = SetWindowLongA&(hwnd, G, Msg)
action = SetLayeredWindowAttributes(hwnd, 0, Level, LWA_ALPHA)