EnableExplicit Define EventID Define lpBuffer = AllocateMemory(255) If OpenWindow(0,0,0,500,400,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) GetWindowModuleFileName_(WindowID(0),lpBuffer,255) MessageRequester("","Pfad: "+PeekS(lpBuffer),0) Repeat EventID=WaitWindowEvent() If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf