File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,8 @@ private void ShowListerForm()
214214 }
215215 else
216216 {
217- _listerForm . Show ( ) ;
217+ var foregroundWindowHandle = NativeMethods . GetForegroundWindow ( ) ;
218+ _listerForm . Show ( new Win32WindowWrapper ( foregroundWindowHandle ) ) ;
218219 _listerForm . Activate ( ) ;
219220 }
220221 }
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using System . Text ;
5+ using System . Windows . Forms ;
6+
7+ namespace Wlx2Explorer
8+ {
9+ class Win32WindowWrapper : IWin32Window
10+ {
11+ public IntPtr Handle { get ; private set ; }
12+
13+ public Win32WindowWrapper ( IntPtr handle )
14+ {
15+ Handle = handle ;
16+ }
17+ }
18+ }
Original file line number Diff line number Diff line change 104104 </Compile >
105105 <Compile Include =" Program.cs" />
106106 <Compile Include =" Properties\AssemblyInfo.cs" />
107+ <Compile Include =" Win32WindowWrapper.cs" />
107108 <EmbeddedResource Include =" Forms\AboutForm.resx" >
108109 <DependentUpon >AboutForm.cs</DependentUpon >
109110 </EmbeddedResource >
You can’t perform that action at this time.
0 commit comments