EnableExplicit Define EventID If OpenWindow(0,0,0,500,400,"Window",#PB_Window_BorderLess|#PB_Window_ScreenCentered) ButtonGadget(1,10,10,100,20,"Button",0) SetWindowColor(0,RGB(255,0,0)) SetWindowLongPtr_(WindowID(0), #GWL_EXSTYLE, #WS_EX_LAYERED | #WS_EX_TOPMOST) SetLayeredWindowAttributes_(WindowID(0),RGB(255,0,0),0,#LWA_COLORKEY) Repeat EventID=WaitWindowEvent() If EventID=#PB_Event_Gadget Select EventGadget() Case 1 EventID = #PB_Event_CloseWindow EndSelect EndIf If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf