473,508 Members | 2,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 21200
"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
2640
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
1419
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
2876
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
1088
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
5700
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
11860
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
4158
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
16402
by: HelloWorldHelloWorldHello | last post by:
What i want to know is What is the KeyAscii of " "Tab" key" ?.
0
1229
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
7227
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
7127
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...
0
7391
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...
1
7054
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
5633
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
4713
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...
0
3204
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...
0
1564
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 ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.