I want to use a custom icon in MessageBox.Show("Message", "Title", MessageBoxButton.OK, MeesageBoxIcon.myIcon)
Method.
Any suggestion please?
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
You can use Task Dialog Indirect API from Microsoft, which will help you to show custom dialogs.
Rikin Patel
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.
来源:https://stackoverflow.com/questions/6560493/messagebox-show-custom-icon