The following code turns the window frame transparent, but not the drawing area. Also when moved, the window leaves graphics where it was.
What am I missing to get the entire window transparent, and not having it leave graphics behind?
What am I missing to get the entire window transparent, and not having it leave graphics behind?
Extern "Win32" Function SetLayeredWindowAttributes(HWND:Int,COLORREF:Int,bAlpha:Byte,dwFLAGS:Int) EndExtern Const LWA_ALPHA=2 Graphics 320,240 Local alpha:Int = 192 Local hwnd:Int = GetForegroundWindow() Local tmpStyle:Int = GetWindowLongW(hwnd, GWL_EXSTYLE) If Not (tmpStyle & WS_EX_LAYERED) Then SetWindowLongW(hwnd, GWL_EXSTYLE, tmpStyle|WS_EX_LAYERED) SetLayeredWindowAttributes(hwnd,0,Byte(alpha*255),LWA_ALPHA) SetClsColor 192,192,192 While Not KeyHit(KEY_ESCAPE) Cls DrawText("Test",8,8) Flip Wend End
