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()
214
214
}
215
215
else
216
216
{
217
- _listerForm . Show ( ) ;
217
+ var foregroundWindowHandle = NativeMethods . GetForegroundWindow ( ) ;
218
+ _listerForm . Show ( new Win32WindowWrapper ( foregroundWindowHandle ) ) ;
218
219
_listerForm . Activate ( ) ;
219
220
}
220
221
}
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 104
104
</Compile >
105
105
<Compile Include =" Program.cs" />
106
106
<Compile Include =" Properties\AssemblyInfo.cs" />
107
+ <Compile Include =" Win32WindowWrapper.cs" />
107
108
<EmbeddedResource Include =" Forms\AboutForm.resx" >
108
109
<DependentUpon >AboutForm.cs</DependentUpon >
109
110
</EmbeddedResource >
You can’t perform that action at this time.
0 commit comments