Skip to content

Commit 80f30b3

Browse files
committed
fix form show back when go to other program and go back nw
1 parent 3ab2ba8 commit 80f30b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

NavisPythonShell/IronPythonConsoleCommand.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Diagnostics;
66
using Microsoft.Scripting;
77
using System.Threading;
8+
using System.Windows.Interop;
89
using System.Windows.Threading;
910
using NavisPythonShell.NpsRuntime;
1011
using Forms = System.Windows.Forms;
@@ -97,6 +98,9 @@ public override int Execute(params string[] parameters)
9798
}
9899
});
99100
});
101+
WindowInteropHelper helper = new WindowInteropHelper(gui);
102+
IntPtr hander = Application.Gui.MainWindow.Handle;
103+
helper.Owner = hander;
100104
gui.ShowDialog();
101105
return 0;
102106
}

0 commit comments

Comments
 (0)