473,382 Members | 1,147 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,382 software developers and data experts.

Moving Focus

I am capturing the KeyPress event on a series of text boxes and checking for
the presence of the CR character to move the focus to the next textbox in
tab order. I'm able to do this using the focus method of the textbox, but
even though the focus changes when the CR character is pressed, I still get
a "beep" from the textbox where the focus was when enter was pressed. Is
there any way to turn that off?

Bob
Nov 21 '05 #1
2 1041
Try modify the Handled property of the event arguments. For sample:

Private Sub MyControl_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
'(...) your code
e.Handled = True 'this do the key don't process after leave the
procedure
'(...) your code
End Sub
--
[]s
Cesar
Carsoft Consultoria e Sistemas
www.carsoftnet.com.br


"Robert Boudra" <rb*****@comcast.net> escreveu na mensagem
news:OT**************@TK2MSFTNGP15.phx.gbl...
I am capturing the KeyPress event on a series of text boxes and checking for
the presence of the CR character to move the focus to the next textbox in
tab order. I'm able to do this using the focus method of the textbox, but
even though the focus changes when the CR character is pressed, I still get
a "beep" from the textbox where the focus was when enter was pressed. Is
there any way to turn that off?

Bob
Nov 21 '05 #2
Bob,

Try to use the keyup event for getting the key values in future and use the
keypress only to handle that beep as Cesar showed you.

I hope this helps,

Cor

"Robert Boudra" <rb*****@comcast.net> schreef in bericht
news:OT**************@TK2MSFTNGP15.phx.gbl...
I am capturing the KeyPress event on a series of text boxes and checking
for the presence of the CR character to move the focus to the next textbox
in tab order. I'm able to do this using the focus method of the textbox,
but even though the focus changes when the CR character is pressed, I still
get a "beep" from the textbox where the focus was when enter was pressed.
Is there any way to turn that off?

Bob

Nov 21 '05 #3

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

Similar topics

3
by: Adonis | last post by:
I wish to manually move widgets in Tkinter, now I have successfully done it, but with odd results, I would like to move the widgets with a much smoother manner, and better precision. Any help is...
1
by: Andi B | last post by:
Hi everyone. I have a quick question - if I have a form which refers to a javascript when its submitted using: <form name = "fred" onsubmit = "test()"> and this function creates a popup...
4
by: Craig Bates | last post by:
Hi all I am designing a website for disabled football supporters and because of this, I obviously must consider accessibility to blind users whilst I am producing it - as they are one of the...
1
by: Zvonko | last post by:
Hi! As mentioned in title. How to do it? Thanks Zvonko
12
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can...
1
by: Big E | last post by:
I'm using ASP.net and SQL Server. I have 3 phone number textboxes. 1 for area code. 1 for first 3 numbers and 1 for last 3 numbers. What I want to do is when user types in the 3 characters for...
12
by: Leo Muller | last post by:
I always thought that moving from VB.NET to C# would be very easy. Even though so far it hasn't been hard, there are some annoying things, that may have to do with my visual studio settings. -...
4
by: Nick Wedd | last post by:
I have a test page http://www.files.maproom.org/00/12/q/w.html which almost does what I want. The idea is that, when you hover the mouse over one of the dates near the top of the page, it...
0
by: jvitti | last post by:
I recently upgraded from Access 2000 to Access 2007 and I am having trouble with moving the focus from 1 form to another. While doing data entry if a similar claim is found the claim view form...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.