Keep Messagebox.show() on top of other application using c#

后端 未结 3 2014
遇见更好的自我
遇见更好的自我 2020-12-08 13:08

How to keep a Messagebox.show() on top of other application using c# ??

3条回答
  •  囚心锁ツ
    2020-12-08 14:10

    There's a better solution, without creating a new form.

    MessageBox.Show("Message Text", "Header", MessageBoxButtons.OK, MessageBoxIcon.None, 
         MessageBoxDefaultButton.Button1, (MessageBoxOptions)0x40000);  // MB_TOPMOST
    

    The 0x40000 is the "MB_TOPMOST"-Flag.

提交回复
热议问题