Hello,
I have noticed that when switch between MDI children the focus is changed
from the control with the focus when last deactivate to the control with the
TabOrder of 1. Is there an automatic way to ensure that the focus is
returned to the control that previously had the focus when switching between
MDI children?
Thanks,
Dan 2 1881
"solex" <so***@nowhere. com> schrieb Hello, I have noticed that when switch between MDI children the focus is changed from the control with the focus when last deactivate to the control with the TabOrder of 1. Is there an automatic way to ensure that the focus is returned to the control that previously had the focus when switching between MDI children?
I also read the same question from you two days ago, but I didn't and don't
have an explanation. I tried to reproduce the problem, but I couldn't. The
focus stays at the same control.
Could you please handle the Enter (or gotfocus) event of the control that
gets focused when switched back to the form? Set a breakpoint there and have
a look at the callstack. Expand the "not user code" (roughly translated from
German) by right-clicking in the callstack window and select "view not user
code". Then post the complete callstack here.
--
Armin
Armin,
Thank you for responding. I should also note that the mdi children are
identical and have 3 user controls that I have created (which may be part of
the problem). I will look at the call stack.
Thanks,
Dan
"Armin Zingler" <az*******@free net.de> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. "solex" <so***@nowhere. com> schrieb Hello, I have noticed that when switch between MDI children the focus is changed from the control with the focus when last deactivate to the control with the TabOrder of 1. Is there an automatic way to ensure that the focus is returned to the control that previously had the focus when switching between MDI children? I also read the same question from you two days ago, but I didn't and
don't have an explanation. I tried to reproduce the problem, but I couldn't. The focus stays at the same control.
Could you please handle the Enter (or gotfocus) event of the control that gets focused when switched back to the form? Set a breakpoint there and
have a look at the callstack. Expand the "not user code" (roughly translated
from German) by right-clicking in the callstack window and select "view not
user code". Then post the complete callstack here.
-- Armin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike L |
last post by:
I have a child form frmDataEntry call up another child form frmDealerSearch.
If the user clicks on cancel on frmDealerSearch, I want to close
frmDealerSearch and put the focus on txtDealerNum on frmDataEntry.
Here is my code.
public class frmDataEntry : System.Windows.Forms.Form
{
private void txtDealerNum_Leave(object sender, System.EventArgs e)
{
|
by: solex |
last post by:
Hello,
I have noticed that when switch between MDI children the focus is changed
from the control with the focus when last deactivate to the control with the
TabOrder of 1. Is there an automatic way to ensure that the focus is
returned to the control that previously had the focus when switching between
MDI children?
Thanks,
Dan
|
by: Qwert |
last post by:
Heya,
I have a user control (inherits from listview control). I add a textbox
control to it as a child control and give the child control the focus. All
is well when I type text (keyboard input) but when I click on the child
control for the first time, the click event of the parent control is
triggered and the parent control gets the focus. When I click again on the
child control, the child control's event is triggered and it gets the...
|
by: clickon |
last post by:
For testing purposes i have got a 2 step WizardControl. Eqach step contains
a text box, TextBox1 and TextBox2 respectively. If i put the following code
in the respective activate event handlers for the two steps,
TextBox1.Text ="foo";
and
TextBox2.Text = "bar";
|
by: Jon Slaughter |
last post by:
I've created some custom controls and forms that allow the feature to
temporarily transfer focus to a control that has been entered by the mouse.
Everything seems to work fine but the problem I have is that sometimes I
seem to loose the original "holder" of focus and when the user hits tab
while using "temporary" focus(while the mouse is over a control) it will
change focus to the next control but not update it.
So I have several issues....
| |
by: Senger |
last post by:
Hi There!
I need change the state of a checkboxbutton of a list of buttons.
I use the folowing code to create buttons:
for (z=1; z<=10; z++)
{
string booth = "boo" + (z+t).ToString();
CheckBox MiControl = new CheckBox();
|
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 a Numeric UpDown control focus. Only Focus()
works. But this says to not use it.
|
by: Andrus |
last post by:
I have UserControls in MDI child forms containing TextBoxes and other
controls.
When user re-activates form, I need that Control which was last activated is
activated again.
Currently *first* control is activated always.
To reproduce:
1. Run code.
2. Make TextBox2 as current TextBox by selecting its text
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |