Single instance warning message now always on top of the main app window when "always on top" is enabled

This commit is contained in:
Alexander 2019-10-20 23:21:07 +03:00
parent b475ba9931
commit 569e05dbf2

View file

@ -33,7 +33,10 @@ static void Main()
}
else
{
DialogResult dialogResult = MessageBox.Show(PublicVar.appName + " is already running.\nDo you still want to open a new copy of the app?", PublicVar.appName, MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
DialogResult dialogResult = MessageBox.Show(
PublicVar.appName + " is already running.\nDo you still want to open a new copy of the app?",
PublicVar.appName, MessageBoxButtons.YesNo, MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly);
if (dialogResult == DialogResult.Yes)
{
Application.EnableVisualStyles();