I've been looking for a dialog with a checkbox "Don's show me this dialog again" in C#.
I googled and search a lot, but I just could not find an elegant solution.
The dialog should work as similar as the native MessageBox.Show, but with a new property value (bool value) return to the caller.
Thanks.
Vista and Windows 7 applications can use the new TaskDialog features which extend the standard MessageBoxes to support a checkbox at the bottom (along with all sorts of other goodies such as Command Links, custom button text, footers etc).
Unfortunately from C# you need to do some interop to access this. If you just want the advanced TaskDialogs to target Vista/Windows 7, use the WindowsAPICodePack from http://code.msdn.microsoft.com/WindowsAPICodePack which can handle the interop complexity for you.
If you need to support XP, there is an excellent wrapper that supports the native TaskDialogs on Vista/7 with a WinForms fallback for XP here: http://www.codeproject.com/KB/vista/Vista_TaskDialog_Wrapper.aspx
Why don't you create your own. It is a very simple one. Just derive from System.Windows.Forms.Form
class and mimic it like the one you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With