Another attempt to sort out the dialog appearing behind other windows.

This commit is contained in:
2019-08-23 18:16:02 +01:00
parent efa78ec8a0
commit c6cab848f9
+4 -1
View File
@@ -72,9 +72,12 @@ namespace ASCOM.Meade.net
return profileProperties; return profileProperties;
} }
[DllImport("user32.dll")]
private static extern bool SetForegroundWindow(IntPtr hWnd);
private void SetupDialogForm_Shown(object sender, EventArgs e) private void SetupDialogForm_Shown(object sender, EventArgs e)
{ {
BringToFront(); SetForegroundWindow(Handle);
Activate(); Activate();
} }