Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Just create your own using a form. A messagebox is a standard dialog and shows the colours based on the colour scheme of the PC it is shown on - as far as i know, but whenever i want to customise the messagebox i just create a form modify it to my needs and show that with a message.

 

If you need an example give me a shout

Visit: VBSourceSeek - The VB.NET sourcecode library

 

 

"A mere friend will agree with you, but a real friend will argue."
Posted

You could even inherit the messagebox to keep all the functionality. override the onpaint to include your own color.

 

I dont have .net in front of me right now so this is just untested theory but it should work.

 

Dill

  • Leaders
Posted

Actually, if you try to Inherit the messagebox, you'll get a warning stating that you'll have to add a constructor since the only constructor for the messagebox class is Private (thus beginning the metaproblem) - when you create a constructor, you must immediately call the base class constructor, but (obviously) you can't call the base class constructor, because it is private. :(

And I think the MessageBox.Show is just a dummy class that actually creates a new form from scratch and shows it - it's not an actual form. It doesn't even inherit form.

:)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted
Make your own messagebox class that allows you to change the color. It will be useful for when you will ( YOU WILL! ) want to change those things in the future.
  • Administrators
Posted
Just out of interest why would you want to change the colour of the MessageBox? If a user has chosen a colour scheme from windows control panel then your message box should follow that; otherwise you could end up with severe colour clashes, hard to read displays and would also be causing problems for the visual impaired who happen to have selected a high contrast scheme.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...