Code: Select all
#include"windows.bi"
'Level: 0 = transparent 255=opaque
SUB SetWindowOpacity (h AS integer, Level as ubyte)
CONST G = -20
DIM Msg AS LONG
dim hWnd as any ptr=cast(any ptr, h)
Msg = GetWindowLong(hWnd, G)
Msg = Msg OR WS_EX_LAYERED
SetWindowLong(hWnd, G, Msg)
SetLayeredWindowAttributes(hWnd, 0, Level, LWA_ALPHA)
END SUB
screencontrol 103,"GDI"
screenres 640,480,32
print "Hello world"
dim h as integer
screencontrol 2,h
setwindowopacity h,128
sleep