Improving the logic to make sure new windows are moved to the front, so the user can't miss them.

This commit is contained in:
Robin 2015-04-17 11:20:30 +02:00
commit 9d7299e5ea
5 changed files with 52 additions and 26 deletions

View file

@ -60,7 +60,14 @@ namespace GreenshotPlugin.Controls {
browser.ScriptErrorsSuppressed = false;
browser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(browser_DocumentCompleted);
browser.Navigate(new Uri(authorizationLink));
}
/// <summary>
/// Make sure the form is visible
/// </summary>
/// <param name="e">EventArgs</param>
protected override void OnShown(EventArgs e) {
base.OnShown(e);
WindowDetails.ToForeground(Handle);
}