EnableExplicit Define EventID If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) If CreateToolBar(1, WindowID(0)) ToolBarStandardButton(0, #PB_ToolBarIcon_New) ToolBarStandardButton(1, #PB_ToolBarIcon_Open) ToolBarStandardButton(2, #PB_ToolBarIcon_Save) EndIf ButtonGadget(1, 10, 30, 100, 20, "Verschieben", 0) Repeat EventID = WaitWindowEvent() If EventID = #PB_Event_Gadget Select EventGadget() Case 1 SendMessage_(ToolBarID(1), #TB_MOVEBUTTON, 1, 2) EndSelect EndIf If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf