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

  • Home
  • SEARCH
  • 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 8071771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:48:12+00:00 2026-06-05T13:48:12+00:00

I need to determine if the value of a NumericUpDown control was changed by

  • 0

I need to determine if the value of a NumericUpDown control was changed by a mouseUp event.

I need to call an expensive function when the value of a numericupdown has changed. I can’t just use “ValueChanged”, I need to use MouseUp and KeyUp events.

enter image description here

Basically, I need to know:

Did the value of the numericUpDown change when the user let go of the
mouse? If any area which is not highlighted in red is clicked, the
answer is no. I need to IGNORE the mouse up event, when ANYWHERE but the red area is clicked.

How can I determine this by code? I find events a little confusing.

  • 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-05T13:48:15+00:00Added an answer on June 5, 2026 at 1:48 pm

    This will fire when the user releases the mouse button. You might want to investigate which mousebutton was released.

    EDIT

        decimal numvalue = 0;
        private void numericUpDown1_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left && numvalue != numericUpDown1.Value)
            {
                //expensive routines
                MessageBox.Show(numericUpDown1.Value.ToString());
            }
    
            numvalue = numericUpDown1.Value;
        }
    

    EDIT 2
    This will determine if the left mousebutton is still down, if it is exit before performing expensive routine, doesn’t help with keyboard button down.

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            if ((Control.MouseButtons & MouseButtons.Left) == MouseButtons.Left)
            {
                return;
            }
            //expensive routines
    
    
        }
    

    Edit 3

    How to detect the currently pressed key?

    Will help solve the Any key down, Though I think the only ones that matter are the arrow keys

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

Sidebar

Related Questions

i need to get a string in jQuery to determine an integer value, then
I am using checkboxs in a GridView. I need to determine the value in
I need to determine the value of a specific macro the binary was compiled
I need to determine value of (DirectoryEntry) user.Propertes[pwdLastSet].Value how would I marshal such value
I need to determine if a value exists in an array. I am using
I need to determine if a Perl hash has a given key, but that
I need to determine if the key of a new key value pair is
When adding an item in my database, I need it to auto-determine the value
I need to determine the argspec (inspect.getargspec) of a function within a decorator: def
My winform application is launched by another application (the parent), I need determine the

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.