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 9068613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:14:00+00:00 2026-06-16T17:14:00+00:00

I want to program an app where the user can enter a number in

  • 0

I want to program an app where the user can enter a number in a NumericUpDown Control. There are some conditions to the number (e.g. range) that are determined in run time. To give feedback to the user I changed BackColor of NumericUpDown to red when at least one condition is not met. So far it works as i expect it to do.

Now i wanted to add a ToolTip to NumericUpDown to explain why the number was “wrong”. When I use the event NumericUpDown_BackColorChanged to adjust the text, the event just won’t “trigger”. Why is that?

I guess it has to do with the composite character of NumericUpDown as Hans Passant has stated here and here. But I am not sure. TY for the help in advance.

private void numericUpDown1_ValueChanged(object sender, EventArgs e)
    {
        if (numericUpDown1.Value == 42)
        {
            numericUpDown1.BackColor = Color.Red;
        }
        else
        {
            numericUpDown1.BackColor = System.Drawing.SystemColors.Window;
        }
    }

private void numericUpDown1_BackColorChanged(object sender, EventArgs e)
    {
        //something epic should happen
        //but somehow my program never reaches these lines :(
    }
  • 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-06-16T17:14:02+00:00Added an answer on June 16, 2026 at 5:14 pm

    I’ve confirmed that the NumericUpDown.BackColor property setter indeed does not call OnBackColorChanged (in .NET 4.0 at least).

    I assume this happens because the BackColor property has been overriden in UpDownBase to also set the BackColor of the composited controls inside NumericUpDown and maybe someone forgot to call the base implementation (I’d love to hear from some of the WinForms gurus here).

    What you can do is create a FixedNumericUpDown control that inherits from NumericUpDown and overrides the BackColor property as such:

    public Color BackColor
    {
        override set
        {
            base.BackColor = value;
            OnBackColorChanged(EventArgs.Empty);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a companion Windows desktop program for my app. One that
I want to program an Android app -for android 2.1 and above- that does
I want my iphone app automatically logs on to Facebook so that the user
I´m writing an program that uses twitter. I want that my app shows an
I want a program that would help me create virtual devices on a virtual
I want a program that runs continually and monitors the time constantly. When it's
I want my program to change its window's caption in response to various user
I am using WebBrowser control in the WinForms application. I want to write program
I have a user complaining that my app is taking a lot of CPU
I have a Property in my App.xaml.cs called User that holds the User details.

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.