private void BtnBorderMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { try { var w = new wSettings(); var wih = new System.Windows.Interop.WindowInteropHelper(w); wih.Owner = (IntPtr)dApp.AppWindow.Handle; w.ShowDialog(); LoadPresets(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }