Due to popular demand, well at least 2 people anyway, I have added a Kryptonized version of the standard windows MessageBox funtionality. In order to make it fully backward compatible I have provided a set of static methods that have identical parameters to the existing MessageBox methods. So you need only perform a search and replace of the existing MessageBox.Show methods so they become KryptonMessageBox.Show instead.

Here you have some examples of the appearance using different palettes…

The text used in the buttons is localizable and exposed via the KryptonManager component. So if you need to define text for non-English systems you can update the new GlobalStrings property of the manager and all message boxes will then use those updated strings.

19 Responses to “KryptonMessageBox”

  1. Sven Says:

    Nice work. :)

    The default Messagebox copies the text to the clipboard when I press CTRL+C. Is your messagebox supporting this?

  2. Andy Says:

    Thanks for your excellent work!

  3. Austin Says:

    Thank you.

  4. Roger F Says:

    Beautiful! Can’t wait to use it.

    Thank you.

  5. Phil Wright Says:

    I didn’t realize that the MessageBox had a Ctrl+C feature. It sounds useful and I have added it so that the message text is added to the clipboard as requested.

  6. colonel32 Says:

    This is an excellent addition, as is the Ctrl+C which I use all the time in standard MessageBoxes.

  7. colonel32 Says:

    In fact the standard MessageBox sends this to the clipboard:

    —————————
    Caption
    —————————
    This is a message box!
    —————————
    OK Cancel
    —————————

  8. pat4asi Says:

    We have done my customize message box right now with few more useful function if you can cover those as well.

    1. We have a timer option in Message Box, this will allow to set the seconds and after those seconds specific button got click. Same time timer shows the counter on that button which is going to click after specific second. I think AVG update has such option.

    2. We have added detail message option, this allows to put long message for the message box and it allows the expand – collops button bellow the button area to view the full detail message. this is more useful for hiding the detail error message from the end user.

    3. Checkbox option, this allow us to have option like Do Not Show In Future.

    Please consider these items, we already have it in our customize message box but i think it could be useful for many other krypton users too.

    Thanks.

  9. Phil Wright Says:

    colonel32: Yes, the CTRL+C on KryptonMessageBox does produce the same output as the standard message box.

    pat4asi: I like your additions but I have no plans to add those to the Krypton at the moment.

  10. VV Says:

    How about adding the ability to customise the button text on a per-message box basis? For example, on one, I’d like to have “Continue”, “Retry” and “Cancel”, but on another stick with the standard “Yes”, “No”, “Cancel”. You can do this with the standard MessageBox if you faff around with Win32 unpleasantness, so it would be nice to be able to do it directly from the Krypton implementation.

  11. Ovidiu Negus Says:

    What about the Task Dialog introduced with Vista ?
    http://msdn.microsoft.com/en-us/library/bb760441(v=VS.85).aspx

  12. Malisa Ncube Says:

    @Ovidiu

    That cannot be Kryptonotized, Its supposed to have a Vista/Aero theme.

    Choose from

    http://www.codeproject.com/KB/vista/Vista_TaskDialog_Wrapper.aspx
    http://www.codeproject.com/KB/vista/TaskDialogWinForms.aspx
    http://www.codeproject.com/KB/WPF/WPFTaskDialogVistaAndXP.aspx

  13. gael Says:

    Hello,
    is it possible to translate the buttons of KryptonMessageBox in a class (the project does not count any KrytponForm)?

    In advance thank you

  14. Darkgray Says:

    How do you use the messagebox in VB.net?

    thank you…

  15. Johan Wenting Says:

    How can i set the icon?

    I’ve got this now:
    KryptonMessageBox.Show(“Prompt”, “Window Title”)

    Please help me!

  16. Johan Wenting Says:

    Solved

  17. Jack Says:

    KryptonMessagebox is cool. Good work. However it at time appears on top left corner of screen. Please fix that soon.

  18. IvanhofBoris Says:

    I want download KryptonMessageBox,Please Help me. This control…I need, well you now

  19. Ken Says:

    Hi. Just a note re message box. It doesn’t accept key press as does the windows messagebox ie Y = Yes. I know the Yes isn’t &Yes however seems microsoft thought it was a good idea without the underscore.

    Just a heads up? Cheers

Leave a Reply