473,387 Members | 3,033 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,387 software developers and data experts.

How to Detect the "TAB" Key is Pressed

How to Detect the "TAB" Key is pressed in the Text Box or Combo Box....
Which events catches the TAB key...
I Want to perform some operations when the "TAB" key is pressed...
--
Peter...
Nov 21 '05 #1
2 21172
"Prabhudhas Peter" <Pr*************@discussions.microsoft.com> schrieb:
How to Detect the "TAB" Key is pressed in the Text Box or Combo Box....
Which events catches the TAB key...
I Want to perform some operations when the "TAB" key is pressed...


Add this to your form's code:

\\\
Protected Overrides Function ProcessTabKey( _
ByVal forward As Boolean _
) As Boolean
MyBase.ProcessTabKey(forward)
MsgBox("Tab key was pressed!")
End Function
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Hi,

I suggest you use the next code:

Private Sub TextBox1_KeyUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
If (e.KeyCode = Keys.Tab) Then
MessageBox.Show("Tab Key")
End If
End Sub

With this code, you'll receive the feedback when the user has pushed the Tab
key and the focus has been received by the TextBox Control.

I hope that helps.

Kind regards,

Jorge Serrano PĂ©rez
MVP VB.NET
"Prabhudhas Peter" wrote:
How to Detect the "TAB" Key is pressed in the Text Box or Combo Box....
Which events catches the TAB key...
I Want to perform some operations when the "TAB" key is pressed...
--
Peter...

Nov 21 '05 #3

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

Similar topics

1
by: Dave McCloskey | last post by:
How can I convert the "Enter" key to a "Tab" so my application will act like "Tab" has been hit when the "Enter" key has actually been depressed. This gives type-writer functionality to programs....
0
by: ad | last post by:
The user want to user "Enter" key to jump as "tab" do when editing data in a dataGrid. How can to do that?
5
by: Lars Netzel | last post by:
Hey! I have tried...(in a datagrid) e.KeyDate.Return and e.KeyDate.TAB end e.KeyDate.Enter
0
by: Sven Franz | last post by:
I develop an MDI-Application in vb.net (2002). But I got som errors, I can`t handle. When I have opened some MDI-Children and also closed them, my application crashed when I switch to an other...
7
by: Doug Bell | last post by:
Hi, I have just built a small application with a form that has one Text Box and one Check Box and a couple of Command Buttons. What I am trying to achieve is that if the Text Box has focus and...
25
by: mdh | last post by:
I wrote a little insignificant program, to help me write a more significant one!!...that was supposed to print all Ascii values from 0 to 127: >>>> #include <stdio.h> # define UPPER_LIMT 127...
3
by: aryayudhi | last post by:
I have a html page that has javascript that works perfectly in IE, but not in Firefox. The use of this javascript to change "Tab" to "Enter" Button. When we press Tab, it is like when we press Enter...
4
by: HelloWorldHelloWorldHello | last post by:
What i want to know is What is the KeyAscii of " "Tab" key" ?.
0
by: akmarif | last post by:
import java.awt.Component; import java.awt.GridLayout; import java.awt.KeyboardFocusManager; import java.util.Collections; import javax.swing.JButton; import javax.swing.JFrame; import...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.