473,804 Members | 3,941 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP : regarding Textbox Enter and Focus Question many TIA

Hi ,
I did ask before but got no replies.

I have a series of textboxes, In Enter event I need to set the focus to a different textbox
I am having problems when I set focus within the Textbox Enter event.
It is looping thru the events.

Does anyone know how I can set focus to another object when the Textbox has
received focus either by keyboard or mouse event.

THANK YOU.
Nov 16 '05 #1
3 1557
Maybe you can tell us more (or more specifically) what you need to
accomplish?
Are you trying to prevent certain textboxes from getting the focus?

<Co**********@a l.com> wrote in message
news:cu******** **@news7.svr.po l.co.uk...
Hi ,
I did ask before but got no replies.

I have a series of textboxes, In Enter event I need to set the focus to a
different textbox
I am having problems when I set focus within the Textbox Enter event.
It is looping thru the events.

Does anyone know how I can set focus to another object when the Textbox
has
received focus either by keyboard or mouse event.

THANK YOU.

Nov 16 '05 #2
I would just hook into the key up event. It will be the last event that
is fired when a key si pressed in the textbox. When you find out that it is
the enter key, you just have to call the GetNextControl method on the
current control to find the next control in the tab order. Then call the
Focus method on that control to set the focus.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

<Co**********@a l.com> wrote in message
news:cu******** **@news7.svr.po l.co.uk...
Hi ,
I did ask before but got no replies.

I have a series of textboxes, In Enter event I need to set the focus to a
different textbox
I am having problems when I set focus within the Textbox Enter event.
It is looping thru the events.

Does anyone know how I can set focus to another object when the Textbox
has
received focus either by keyboard or mouse event.

THANK YOU.

Nov 16 '05 #3
Setting the focus to another control in the Enter-event disables the first
control of getting the focus.

Maybe you should give us some extra information on what you want to do?

"Co**********@a l.com" wrote:
Hi ,
I did ask before but got no replies.

I have a series of textboxes, In Enter event I need to set the focus to a different textbox
I am having problems when I set focus within the Textbox Enter event.
It is looping thru the events.

Does anyone know how I can set focus to another object when the Textbox has
received focus either by keyboard or mouse event.

THANK YOU.

Nov 16 '05 #4

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

Similar topics

3
9431
by: Randi | last post by:
Hi All, I have a problem on a username password login form. I use: txtPassword.Text = StrConv(txtPassword.Text, vbProperCase) to validate the proper case when someone enters their name and password. It work when you use the button to continue, but if you hit enter on your keyboard the event apparently doesnt lose focus and it says you entered the wrong password. Is there an easy fix for this. I pointed out the problem code below. Any...
9
7029
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have it return the associated records to a listbox. Once the listbox has the records, I want to select a record, which will open a form associated with the selected record in the listbox.
1
1539
by: geneb | last post by:
I've got a number of tabs with text boxes on them. When you hit the last textbox on a tab, it checks to see if the next tab is a valid destination, then goes to it if so. Unfortunately, when this happens, both the Enter _and_ Leave events of the first textbox control are fired, causing all sorts of mayhem. On a related note, I have another textbox that has it's Enter/Leave events fired when other controls are changing focus...
4
1322
by: melanieab | last post by:
Hi, Sorry this is a long message, but I'm getting desperate (and worried). I have a textbox (say, tb1) where the string is longer than the width of the box. If I'm coming from the previous textbox (tb0) (by tabbing or pressing enter or the down arrow), the text inside tb1 highlights and the cursor is at the end of the string (so that the beginning of the string isn't visible). If I type absolutely any key(s) other than Tab, Up, Down, or...
0
9706
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
9584
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
10583
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
10323
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
10082
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...
1
7622
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 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...
0
5525
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
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
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

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.