Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


How to go one TextField to next TextField using Enter Key


How to go one TextField to next TextField using Enter Key

Author
Message
maheshcse09
maheshcse09
Forum God
Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)

Group: Forum Members
Posts: 2, Visits: 3
hi,

i'm Mahesh,i'm new in VB.i've one dought.How to go one TextField to next TextField using Enter Key.

pls if any one know the concept.pls tell me.



thank u



mahesh

by,

mahesh
Keithuk
Keithuk
Forum God
Forum God (155K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
Welcome to A1vbcode Mahesh.

Can you explain a bit more about what your trying to achieve TextField to next TextField using Enter Key?


Keith

I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

maheshcse09
maheshcse09
Forum God
Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)Forum God (460 reputation)

Group: Forum Members
Posts: 2, Visits: 3
Dear Keith,

thanks ur kind reply.. u r Jenious in vb. but u told still i'm learning.its amazing habit.



In vb6 tab key used to move from one textfield to next textfield.

My dought:why use Enterkey replace by tab key. its possible?



thank u

by,

mahesh
Edited
8/14/2012 by maheshcse09
Keithuk
Keithuk
Forum God
Forum God (155K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
Ok lets get the terminology right. Yes thats called TabIndex not TextField.

Most controls in VB6 have a KeyPress event where it will do other other operations when certain keys are pressed, experiment.

Keith

I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

Mark
Mark
Forum God
Forum God (75K reputation)

Group: Moderators
Posts: 1.1K, Visits: 11K
KeyPreview and SendKeys is what you need.

Private Sub Form_KeyPress(KeyAscii As Integer)
    ' Test for the enter key being pressed
    If KeyAscii = 13 Then
        ' cancel the keypress
        KeyAscii = 0
        ' call the tab key
        SendKeys "{TAB}"
    End If
End Sub

Private Sub Form_Load()
    ' let the form capture keyboard events
    Me.KeyPreview = True
End Sub

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search