EnableExplicit Global TBColor = CreateSolidBrush_(RGB(100, 200, 255)) Procedure WCB(WindowID, Message, wParam, lParam) Protected Result Result = #PB_ProcessPureBasicEvents Select Message Case #WM_CTLCOLORSTATIC Select lparam Case GadgetID(1) SetBkMode_(wParam, #TRANSPARENT) Result = TBColor EndSelect EndSelect ProcedureReturn Result EndProcedure If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) TrackBarGadget(1, 50, 50, 400, 50, 0, 50, #PB_TrackBar_Ticks) SetWindowColor(0, RGB(100, 200, 255)) SetWindowCallback(@WCB(),0) Repeat Select WaitWindowEvent() Case #PB_Event_CloseWindow End EndSelect ForEver EndIf