473,382 Members | 1,348 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 2368
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*****@newsgroups.nospamwrote in message
news:1D**********************************@microsof t.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
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
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...
10
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...
0
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...
3
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...
4
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...
5
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...
9
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...
0
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.