If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ImageGadget(1,10,10,32,32,0,0) SetGadgetState(1,ExtractIcon_(GetModuleHandle_(0),"Shell32.dll",10)) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf