473,545 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fail to get the focus back from NumericUpDown control

Hello experts,

I posted a disturbing question in here:
http://www.microsoft.com/communities...3-a98a6808759c

But no one have answered it.
Is not clear? or maybe it a Framework bug?
Please help.
--
Thanks
Sharon
Sep 21 '08 #1
2 2381
I don't recall seeing this when originally posted.

Now that I look at it, I don't really understand how to help. You have
shown no code. The original post describes a strange desire, that I cannot
comprehend clearly. You have a numeric-up/down on a control B, and after
the user unclicks the up/down, you want some foreign control A to take
focus. This seems distracting to the user, if I follow the goal.

If I understand your goal, then it seems Control B could raise a custom
event that Control A would subscribe, when the numeric control was released.
Control A would focus within it when the event occurs.

"Sharon" <Sh*****@newsgr oups.nospamwrot e in message
news:1D******** *************** ***********@mic rosoft.com...
Hello experts,

I posted a disturbing question in here:
http://www.microsoft.com/communities...3-a98a6808759c

But no one have answered it.
Is not clear? or maybe it a Framework bug?
Please help.
--
Thanks
Sharon
Sep 21 '08 #2
I don't think I'm doing anything strange. I'll try to be more clear.

I' writing a UserControl derived class A.
A contains another UserControl derived class B.
B contains 2 Label controls and 2 NumericUpDown controls.

What supposed to happen:
The user click on one of the NumericUpDown arrows to set it's value.
Then the user click on the parent class A area (large area that draw
something).
A should get the focus.

What actually happens:
After the user click on A area, the focus remains at the NumericUpDown.
I tried handling the MouseUp event of A to take the focus by Focus() (or by
Select()) but the focus stays at the NumericUpDown.
I used the CanFocus at A MouseUp event handler and it returns true, still;
the following Focus() and Select() fails.

Note: After the application starts, the focus is set correctly at the parent
A control,
but I can get the focus back after the NumericUpDown has taken it.
How can I take the focus back to control A when the user wishes to by
clicking on the A area?

--
Thanks
Sharon
Sep 22 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
9836
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
0
1915
by: Koert | last post by:
Hi, In the NumericUpDown control I have to detect that Tab was pressed so I have overroden the PreProcessMessage function. In for example the DateTimePicker this works fine but not in the NumericUpDown. The debugger does not stop in the PreProcessMessage function. Is this a bug in the NumericUpDown control? thanks, Koert
10
7123
by: Bonj | last post by:
I'm using a number of NumericUpDown controls on my form, which controls printer settings such as number of pages. However I want to override one of the default behaviours of the control, namely when it is tabbed into (selected), I want the number that is displayed in it to become selected, so the user can just type straight over it. For this...
0
1417
by: Koert | last post by:
Hi In the NumericUpDown control I have to detect that Tab was pressed so I have inherited the NumericUpDown and overroden the PreProcessMessage function. In the DateTimePicker (for example) this works fine but not in the NumericUpDown. It seams that the debugger does not access the PreProcessMessage function. Is this a bug in the NumericUpDown...
3
30092
by: abc my vclass | last post by:
My win-form have many numericupdown controls to applied. But numericupdown control don't like textbox, text box control can automatic selected text when got focus. Is there any method can let me set all numericupdown autoselect text when gotfocus?
4
4675
by: illegal.prime | last post by:
Hey all, I have a NumericUpDown control on a Panel or potentially a Form that have AutoScroll enabled. When the NumericUpDown is active I would like the Form/Panel/whatever not to scroll when I scroll the value in the NumericUpDown. I can add an additional handler to the MouseWheel event on the NumericUpDown, but how do I stop the...
5
2167
by: Len Weltman | last post by:
I am trying to pass a NumericUpDown object into a class method using Visual Studio 2005, but the control type is not found in Intellisense and the type declaration is flagged as an error. Here is a code sample (which doesn't work): *** Begin code ***
9
17976
by: Zytan | last post by:
http://msdn2.microsoft.com/en-us/system.windows.forms.control.focus(VS.80).aspx this page says: "Focus is a low-level method intended primarily for custom control authors. Instead, application programmers should use the Select method or the ActiveControl property for child controls, or the Activate method for forms." I am trying to give...
0
1017
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello Gurus, Using VS2005 with .NET Framework 2.0. I wrote a GUI control A derived from UserConstrol, this control contains another UserControl derived B which contains two Labels controls and two NumericUpDown controls. The trouble is: After one of the NumericUpDown get the focus by mouse click on it, I can not
0
7468
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7808
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7423
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4945
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.