473,794 Members | 3,056 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tab Control Focus

I am trying to set some checks on my tab pages. I have many sets of tab
control pages with many controls on each page. I have got the code on the
button to check each control to make sure it has an amount. It then sets the
focus to that control if it does not have an amount. If I am on a different
tab page and do a check, it will set the focus, but it will not take me to
the tab page that has the control with the focus.

What code do I need to place in the following code to get it to go to the
specific tab page with the control with the focus?:

If txtLiveNetSales Amounts.TextLen gth = 0 Then
MessageBox.Show ("Please Enter Amount", "Live Game Net Sales
Amount", _MessageBoxButt ons.OK, MessageBoxIcon. Information)
txtLiveNetSales Amounts.Focus()
Exit Sub
End If

Thank You
--
Things to Do Today:
1.Get A Grip
2. Hang In There
Nov 22 '05 #1
1 1492
Thanks anyways Guys, I figured it out before I got an answer from the group.

"Julie" wrote:
I am trying to set some checks on my tab pages. I have many sets of tab
control pages with many controls on each page. I have got the code on the
button to check each control to make sure it has an amount. It then sets the
focus to that control if it does not have an amount. If I am on a different
tab page and do a check, it will set the focus, but it will not take me to
the tab page that has the control with the focus.

What code do I need to place in the following code to get it to go to the
specific tab page with the control with the focus?:

If txtLiveNetSales Amounts.TextLen gth = 0 Then
MessageBox.Show ("Please Enter Amount", "Live Game Net Sales
Amount", _MessageBoxButt ons.OK, MessageBoxIcon. Information)
txtLiveNetSales Amounts.Focus()
Exit Sub
End If

Thank You
--
Things to Do Today:
1.Get A Grip
2. Hang In There

Nov 22 '05 #2

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

Similar topics

2
2670
by: Lyn | last post by:
Hi, I have a text control on a form which is bound to table field StartDate which is in Date format. When updating the table record via the form, any data entered into the StartDate control is immediately validated. If the data entered is considered valid, focus moves to the next control in the tab sequence. So far, so good. If the data entered in StartDate is considered invalid, an error message is displayed via MsgBox. When OK is...
2
2157
by: bill | last post by:
I have the following user control in my project simply for setting focus to a control: Public Class SetFocus Inherits System.Web.UI.UserControl
0
1548
by: LCAdeveloper | last post by:
Another newbie question I'm afraid. When I use the .Focus() or .Select() methods to set the initial control that has focus on a form, try as I might I cannot get the control to visually indicate that it has the focus (e.g. a dotted outline around the caption of a RadioButton). The visible and enabled properties are set to true, and I know that the desired control has the focus (in this case one of two or more RadioButtons located in a...
2
8376
by: Tom | last post by:
I am developing a VB.NET user control that is composed of a component control (along with some classes, etc). This is probably a stupid question, and should be easy, but I must be having a brain fart. In the control itself, how do I set focus BACK to the form that the control is on? This control does some maniuplation of an outside application (by starting up the application and sending it keystrokes). What I want to be able to do is to...
4
1932
by: Aung Thu | last post by:
Hi, there! I want to set focus on a control, of which TabIndex is not the first, when a form is loaded. In the form's load event, I have used Control.Focus() but it doesn't not work. The focus is not on the control I set. The focus is always on the control of which TabIndex is 0. Thanks.
1
5138
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";
4
4307
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....
9
18022
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.
3
2142
by: Nathan Laff | last post by:
I have a custom Control that is a label, however I inherit from Control... 1) I override onClick and do a DrawFocusRectangle, that works great. How do I clear the focus rectangle once something else on the parent is clicked? I tried to override OnLostFocus and invalidate but that doesn't seem to do it. 2) the control, like i said is a label, how do i override the hotkey behavior. I.e, if my text is &Help, when I do Alt-H on the parent,...
3
7047
by: Simon | last post by:
Dear reader, On the event "Lost focus" I make the ComboBox invisible but the massage pops up "You can't hide a control that has the focus." But this code is written in the "Lost focus" event so the combobox has not longer the focus regarding this event.
0
9519
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,...
1
10163
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
10000
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 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...
0
6779
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
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
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
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...

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.