Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 793437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:09:06+00:00 2026-05-14T22:09:06+00:00

I’m trying to write my own abstraction over the MessageBoxImage enumeration, and see that

  • 0

I’m trying to write my own abstraction over the MessageBoxImage enumeration, and see that MessageBoxImage is defined as:

namespace System.Windows
  {
      public enum MessageBoxImage
      {
          None = 0,
          Error = 16,
          Hand = 16,
          Stop = 16,
          Question = 32,
          Exclamation = 48,
          Warning = 48,
          Asterisk = 64,
          Information = 64,
      }
  }

How does the Show method determine whether to display an Error image or a Hand image?
How would I write a method which takes a MessageBoxImage type, and return a CustomMessageBoxImage type which maps to the MessageBoxImage type, as I can’t include both MessageBoxImage.Error and MessageBoxImage.Hand in the same switch statement?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:09:07+00:00Added an answer on May 14, 2026 at 10:09 pm

    Historically there were different icons that ended up being merged into a single actual icon image. So there are several enumerated type values (Hand and Stop for example) that simply mean the same thing in modern Windows OSes. There is no difference between them, they are simply aliases.

    If you want to have new values to represent differences, then you could use a secondary variable (e.g. “isError) to convey the difference you wish to apply between Stop and Hand. Or you could copy the Icon value into an int and set a high bit in the value to indicate this extra information so it can be “carried” within a single variable. Or you could use your own enumeration that is “unrelated” to the MessageBoxIcon, and have methods that convert from your value to the MessageBoxIcon value.

    I’d suggest having your own “Status” value and then converting that into an Icon value as needed – the two are conveying quite different information, so trying to overload (corrupt) the MessageBox value to convey extra information wouldn’t be a very good approach.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.