i'd know how disable (not remove/hide) close button in wpf window. know how hide makes window's title bar this: but want disable meaning should this: i'm scripting in c# , using wpf (windows presentation foundation). try this: public partial class mainwindow : window { [dllimport("user32.dll")] static extern intptr getsystemmenu(intptr hwnd, bool brevert); [dllimport("user32.dll")] static extern bool enablemenuitem(intptr hmenu, uint uidenableitem, uint uenable); const uint mf_bycommand = 0x00000000; const uint mf_grayed = 0x00000001; const uint mf_enabled = 0x00000000; const uint sc_close = 0xf060; const int wm_showwindow = 0x00000018; const int wm_close = 0x10; public mainwindow() { initializecomponent(); } private void window_loaded(object sender, routedeventargs e) { } protected override void onsourceinitialized(eventargs e) { base...