File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ namespace OneMoreCalendar
1111 using System . Globalization ;
1212 using System . IO ;
1313 using System . Linq ;
14+ using System . Runtime . InteropServices ;
1415 using System . Threading . Tasks ;
1516 using System . Xml . Linq ;
1617
@@ -21,6 +22,10 @@ namespace OneMoreCalendar
2122 /// </summary>
2223 internal class OneNoteProvider
2324 {
25+ [ DllImport ( "user32.dll" ) ]
26+ [ return : MarshalAs ( UnmanagedType . Bool ) ]
27+ public static extern bool SetForegroundWindow ( IntPtr hWnd ) ;
28+
2429
2530 /// <summary>
2631 /// Export an EMF representation of the specified page to the TEMP folder
@@ -232,6 +237,7 @@ public async Task NavigateTo(string pageID)
232237 if ( ! string . IsNullOrEmpty ( url ) )
233238 {
234239 await one . NavigateTo ( url ) ;
240+ SetForegroundWindow ( one . WindowHandle ) ;
235241 }
236242 }
237243 }
You can’t perform that action at this time.
0 commit comments