I want to use a custom icon in MessageBox.Show("Message", "Title", MessageBoxButton.OK, MeesageBoxIcon.myIcon)
Method.
Any suggestion please?
I want to use a custom icon in MessageBox.Show("Message", "Title", MessageBoxButton.OK, MeesageBoxIcon.myIcon)
Method.
Any suggestion please?
You can use Task Dialog Indirect API from Microsoft, which will help you to show custom dialogs.
You can't override this behavior of
MessageBox
. The solution is either use some custom message box, check this, or implement your ownMessageBoxForm
and add your custom settings to it, check this.You can not directly change an icon of MessageBox so I googled it and I found the solution for that. we can change an icon of message box using window hook.
Hear is the MSDN Magazine link.
MSDN on the Internet archive
I wrote one a little while ago, it works exactly like the regular messagebox class.
CustomMessageBox (Class): http://pastebin.com/m8evBmZi
MessageForm (Form): http://pastebin.com/jawHZDzY
MessageForm (Designer Code): http://pastebin.com/CRXjeUFN