;Autor: ts-soft EnableExplicit Define EventID Global color = CreateSolidBrush_(RGB(255,0,0)) Procedure myCallback(hWnd, uMsg, wParam, lParam) Select uMsg Case #WM_CTLCOLORSTATIC If lparam = GadgetID(1) ProcedureReturn color EndIf EndSelect ProcedureReturn #PB_ProcessPureBasicEvents EndProcedure If OpenWindow(0,0,0,500,400,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) HyperLinkGadget(1,10,10,200,20,"Link",RGB(0,0,255),#PB_HyperLink_Underline) SetWindowCallback(@myCallback()) Repeat EventID=WaitWindowEvent() If EventID = #PB_Event_CloseWindow DeleteObject_(color) End EndIf ForEver EndIf