customized MessageBox in c#

J

Jean Bredeche

Hi:

I am trying to create customized confirmation/error/etc dialogs in my
application. Up to now we've been using MessageBox.Show and passing it
the various necessary flags (buttons, icons, etc). By "customized", I
mean I want complete control over the color of the messagebox, the
position/color/size of the buttons, etc.

Do I need to create a custom form from scratch, or is there a way to
subclass MessageBox? (I'm guessing I need to create a custom form). If
I need to create a custom form, is there any way I can make use of the
standard Windows dialog icons (the MessageBoxIcons) or do I have to
create my own icons?

thanks,
Jean Bredeche
bredeche at gmail dot com
 
D

Dmytro Lapshyn [MVP]

Hi Jean,

I think creating a custom form should be simpler - well, at least I prefer
my own form when it comes to displaying customized message boxes.
As for re-using system icons, the SystemIcons class contains them all as
static properties.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top