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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:08:10+00:00 2026-05-27T03:08:10+00:00

A NumericUpDown has 2 handles/controls: the outer spinbox, and the inner edit textbox-like control.

  • 0

A NumericUpDown has 2 handles/controls: the outer spinbox, and the inner edit textbox-like control.

I need to get the handle of the inner textbox control. NumericUpDown.Handle gives the outer handle.

The closest I found on Google to that is this this forum conversation. The trick is to use the UDM_GETBUDDY = WM_USER+106 = 0x0400+106 message which returns the handle of the buddy window, in our case the text edit.

The output was something like this at first:

control.Capture = true;
IntPtr outer = User32.GetCapture();
IntPtr inner = new IntPtr(User32.SendMessage(outer, (0x0400 + 106), 0, 0));

But then the OP said this wasn’t working, so someone suggested to use GetWindow(outer, GW_CHILD). where GW_CHILD = 5

control.Capture = true;
IntPtr outer = User32.GetCapture();
IntPtr inner = User32.GetWindow(outer, 5);

For both of these methods, I always end up with inner = 0, which is obviously not the right answer. However, OP stated method 2 seemed to work, so I might be doing something wrong.

By the way, the “capture” mechanic seems to be useless, as I can simply use:

IntPtr outer = control.Handle;

Which returns the same.

So, any ideas on how to get the inner textbox handle?

  • 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-27T03:08:11+00:00Added an answer on May 27, 2026 at 3:08 am

    It is implemented very differently in Winforms, no buddy control. Getting a reference to the text box portion is easy to do, although it violates several encapsulation rules. Not really a problem, NumericUpDown is frozen in time and will never change.

            var box = (TextBox)numericUpDown1.Controls[1];
    

    Be careful with poking properties for that TextBox control, not all of its events are implemented.

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

Sidebar

Related Questions

I have a custom control that has other controls on it. When the user
Suppose you are using a control such as NumericUpDown which has the value property.
Is it possible to get the text area of a NumericUpDown control? I'm looking
I have a numericupdown control on a C# Windows Form, and am interested in
does anybody know how to make a numericupdown control for asp. There's one for
For a project I built a custom DataGridView column which contains NumericUpDown controls. It
MenuPic Greetings. I am using the NumericUpDown control on my application. When I right
I'm writing a real NumericUpDown/Spinner control as an exercise to learn custom control authoring.
I have a Form and numericupdown control located on it. I want that in
I have created a user control tha inherits from the NumericUpDown Control. Is it

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.