System.Windows.MessageBox doesn't wait for user input before going poof!

后端 未结 7 1606
轻奢々
轻奢々 2021-01-08 00:56

...and it makes no sense why. T-T

In my Application_Startup event handler I have code that looks kinda like this:

private void Applicati         


        
7条回答
  •  感动是毒
    2021-01-08 01:22

    Based on Alexey Ivanov's suggestion, I successfully used a new window as the parent

    System.Windows.Forms.MessageBox.Show(new System.Windows.Forms.NativeWindow(), errorMessage, "Application Startup", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    

提交回复
热议问题