473,402 Members | 2,064 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,402 software developers and data experts.

Preserving Focus on a Control in a TabControl in VB.NET


Hello,

I have a VB.NET Form which has a System.Windows.Forms.TabControl on it.
This TabControl has 5 Tabs on it. On each tab, I have various
textboxes, option boxes, radio boxes, etc. I would like to have the
ability to save the focus on a particular control, so that when I go to
another tab, then back to the same tab, the control I left will still
be the highlighted control. For example, if I'm on the "City" Textbox
on the "Customer" Tab, then go to the "Orders" Tab, then back to the
"Customer" Tab...I would like the "City" Textbox to have the cursor on
it. I need to do this without affecting the "TabOrder" of the
TabControl. I've looked into "Focus", "Select", "ActiveControl",
etc...but nothing seems to work.

Any ideas?

Thanks.

Jan 19 '07 #1
0 1054

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

Similar topics

3
by: M O J O | last post by:
Hi, Maybe this question has been asked before, but I've searched the net without finding any answer. I create a new solution, put a TabControl on Form1, create a TabPage and a put a TextBox...
4
by: John | last post by:
Hi I have a form with a tab control which has a text box. When the form loads I would like the text box to have the focus. In the form load event I placed mytxt.focus() as the last line. When I...
2
by: Jack Russell | last post by:
I have a form containing a tab control I want focus set to a particular text box when the form opens. However doing this in the load form event If TabControl1.SelectedIndex = 0 Then If...
3
by: Henry Jones | last post by:
VS 2005 On a form I have a tabcontrol with 5 tabs. Each tab has three textboxes on it. When I click on each tab, I would like to have the focus set to the first textbox. On the tabenter...
0
by: samadams_2006 | last post by:
Hello, I have a VB.NET Form which has a System.Windows.Forms.TabControl on it. This TabControl has 5 Tabs on it. On each tab, I have various textboxes, option boxes, radio boxes, etc. I would...
3
by: Keith Wilby | last post by:
I have a form with 4 subforms on a tab control. How can I detect which sub/tab has the focus from the main form? Many thanks. Keith.
2
by: John Wright | last post by:
I have the following routine I use to check for a certain tab page. I want to enable this tab page only on the tab control and set the focus. However, I cannot get the tab to set focus no matter...
11
by: =?Utf-8?B?RWl0YW4=?= | last post by:
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...
1
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi all! I have a tab control and when I access a tab page I'd like to focus on a textbox. I am using someTextBox.Focus() on tabPage_Enter() event, but it is not focusing in the someTextBox. ...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
tracyyun
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...
0
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,...
0
isladogs
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...

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.