Is there a non-blocking version of MessageBox.Show (or something like it)?

后端 未结 4 1980
自闭症患者
自闭症患者 2021-01-01 09:22

Long-delayed update

I\'m accepting MUG4N\'s answer to this question, and I also want to respond to some of the criticisms that were raised against it.

ChrisF

4条回答
  •  [愿得一人]
    2021-01-01 09:51

    What I would try is call the MessageBox function from the Win32 API directly, like :

    using System.Runtime.InteropServices;
    
    [DllImport("User32.dll")]
    public static extern int MessageBox(int h, string m, string c, int type);
    

    Try using a null handle, and the APPLMODAL type. That may work.

提交回复
热议问题