SDA-3451 Windows - Accessibility - Bringing welcome screen foreground (#1293)

This commit is contained in:
Salah Benmoussati 2021-11-15 14:15:15 +01:00 committed by GitHub
parent 68cdbca3c7
commit 46b7b69c8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,7 @@
using WixSharp;
using System;
using System.Drawing;
using System.Runtime.InteropServices;
namespace Symphony
{
@ -20,8 +22,11 @@ namespace Symphony
InitializeComponent();
}
[DllImport("user32.dll")]
static extern bool SetForegroundWindow(IntPtr hWnd);
void dialog_Load(object sender, System.EventArgs e)
{
SetForegroundWindow(this.Handle);
// Populate the dynamic UI elements that can't be set at compile time (background image and
// the label containing user name)
this.backgroundPanel.BackgroundImage = Runtime.Session.GetResourceBitmap("WixUI_Bmp_Dialog");