473,811 Members | 2,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to detect when Tab Control loses its focus

Hello,

I have a WinForm application. The form has one Tab Control and one
ToolStrip. I would like to know what would be the best way to detect when
the user is "leaving" the Tab Control and "moving" into ToolStrip.

Thank you
EitanB
Aug 15 '07
11 8135
Eitan wrote:
I read the article with the example for a form. How ever, how would I
overide the WndProc for a control (TabPage) on the form?
The same way you do it for a form: you create a new class that inherits
the class you want to override, and use that class in place of the
original one.

Pete
Aug 15 '07 #11
On Aug 15, 12:34 pm, Eitan <Ei...@discussi ons.microsoft.c omwrote:
Hello,

I have a WinForm application. The form has one Tab Control and one
ToolStrip. I would like to know what would be the best way to detect when
the user is "leaving" the Tab Control and "moving" into ToolStrip.

Thank you
EitanB
I use the Validating Event handler.

http://msdn2.microsoft.com/en-us/lib...alidating.aspx

Aug 15 '07 #12

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

Similar topics

5
3320
by: (Pete Cresswell) | last post by:
I've got a TreeView on the left of my screen. As the user navigates the tree, I load corresonding detail info into the rest of the screen. Works ok, but when the user clicks on a detail field, the TreeView's selection rectangle goes away and the user is left wondering what happened. Seems like there ought TB a way to preserve that rectangle. The optimal would be to have it go grey when the control loses focus and return to blue whe...
1
1628
by: (Pete Cresswell) | last post by:
I'm using a subform as a navigation list. On the left side of the screen is a subform containing people's names. The right side of the screen is loaded with information about the currently-selected person. As the user walks the list, the right side of the screen gets reloaded with info about each new name. When the user decides to change something, they click an "Edit" button that puts
5
9462
by: Vinny Vin | last post by:
I would like to display a ToolTip (WinForms) when the Control associated recieves focus (when the control.enter event is triggered) as oppose to having the ToolTip displayed when the mouse hovers over the control,How can this be accomplished(Im developing in C#)?
3
2275
by: Gidi | last post by:
Hi, Is it possible to know when TextBox loses focus to which object it lost it? what i mean is when the LostFocus Event occur is it possible to know which object got the focus instead? thanks,
3
6142
by: Greg | last post by:
The LostFocus event of datagrids is fired when the focus is added to a cell. How do you go about detecting it when the control as a whole has lost focus to another control? Slightly confused by this! Greg.
1
1900
by: jjwhite01 | last post by:
I am working on a web form that contains a Calendar control with an image button that makes the calendar appear and disappear. However, I would like to set the visible property of the Calendar control to false when the control loses focus so that when the user moves to the next field in the form the calendar disappears. Is there anyway to do this in ASP.NET or ASP.NET w/ Javascript?
2
13440
by: bg_ie | last post by:
Hi, I have a treeview where the user selects a node before editing it. The problem is that when the user clicks on the text box to edit the node, the treeview loses its focus and the node is no longer highlighted. To fix this I do something like - void treeView_AfterSelect(object sender, EventArgs e) { selectedNode.BackColor = Color.White;
3
1779
by: Stanton | last post by:
How can I get an image to appear when a control has the focus in a form? I would assume expression builder might be useful, but whenever I try to put an expression into an event box, it tries to find the expression as a macro title and fails. (Also, I see Me comes up a lot in expressions, and wonder if that's why mine don't work... what does it mean??)
3
2028
by: StinkyDuck | last post by:
Is there a way to detect when a control gains focus on a webform? Say I have two text boxes. After the user types in information on the first text box and hits the tab key or clicks on the second text box, I want to automatically fill in the second text box with the information from the first text box. I just can't seem to find an event handler for when the control gains/loses focus. -StinkyDuck
0
9727
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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,...
0
10647
Oralloy
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...
1
10398
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,...
0
9204
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5554
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
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.