Click here to Skip to main content
15,924,482 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionMSI Versioning Pin
lucyzhu31-May-07 3:12
lucyzhu31-May-07 3:12 
Questionstring Pin
WhiteGirl2331-May-07 2:39
WhiteGirl2331-May-07 2:39 
AnswerRe: string Pin
Christian Graus31-May-07 2:46
protectorChristian Graus31-May-07 2:46 
AnswerRe: string Pin
shally_7931-May-07 2:47
shally_7931-May-07 2:47 
GeneralRe: string Pin
WhiteGirl2331-May-07 3:38
WhiteGirl2331-May-07 3:38 
GeneralRe: string Pin
Guffa31-May-07 5:25
Guffa31-May-07 5:25 
QuestionTransfer Cursor via Enter Key Input Pin
Duane in Japan31-May-07 2:19
Duane in Japan31-May-07 2:19 
AnswerRe: Transfer Cursor via Enter Key Input Pin
Marcus J. Smith31-May-07 2:47
professionalMarcus J. Smith31-May-07 2:47 
Add the following line to your form load for each control that it is relevant for.
AddHandler uxControlWhereEnteredKeyPressed.KeyPress, AddressOf Me.NameOfEventToHandleThis
Here's the event.
Private Sub NameOfEventToHandleThis(ByVal sender As Object, ByVal e As KeyPressEventArgs)
        If e.KeyChar = Chr(13) Then
            SelectNextControl(Me.ActiveControl, True, False, True, True)
            e.Handled = True
        End If
End Sub
The False will stop on Non-tab stop items so just make sure your tab order is in the correct order but set the CheckBoxes to TabStop = False.

If you want to speed up adding the handler use the following snippet of code.
For Each ControlOnForm In Me.Controls
                If TypeOf ControlOnForm Is TextBox Then
                        DirectCast(ControlOnForm, TextBox).KeyPress, AddressOf Me.NameOfEventToHandleThis
                End If
Next
I hope this helps.


CleaKO

"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)

GeneralRe: Transfer Cursor via Enter Key Input Pin
Duane in Japan31-May-07 13:15
Duane in Japan31-May-07 13:15 
GeneralRe: Transfer Cursor via Enter Key Input Pin
Marcus J. Smith1-Jun-07 1:31
professionalMarcus J. Smith1-Jun-07 1:31 
GeneralRe: Transfer Cursor via Enter Key Input Pin
Duane in Japan3-Jun-07 4:12
Duane in Japan3-Jun-07 4:12 
QuestionDataGridView columns reorder themselves when I open the designer Pin
Marcus J. Smith31-May-07 1:41
professionalMarcus J. Smith31-May-07 1:41 
AnswerRe: DataGridView columns reorder themselves when I open the designer Pin
shally_7931-May-07 2:59
shally_7931-May-07 2:59 
QuestionGroup by/sum average Pin
cstrader23231-May-07 1:32
cstrader23231-May-07 1:32 
AnswerRe: Group by/sum average Pin
Guffa31-May-07 1:44
Guffa31-May-07 1:44 
GeneralRe: Group by/sum average Pin
cstrader23231-May-07 3:05
cstrader23231-May-07 3:05 
GeneralRe: Group by/sum average Pin
Guffa31-May-07 5:48
Guffa31-May-07 5:48 
GeneralRe: Group by/sum average Pin
cstrader23231-May-07 11:38
cstrader23231-May-07 11:38 
AnswerRe: Group by/sum average Pin
Guffa31-May-07 22:07
Guffa31-May-07 22:07 
Questionpls help... another question.... Pin
moomoooomoo31-May-07 1:28
moomoooomoo31-May-07 1:28 
AnswerRe: pls help... another question.... Pin
Rupesh Kumar Swami31-May-07 1:34
Rupesh Kumar Swami31-May-07 1:34 
GeneralRe: pls help... another question.... Pin
moomoooomoo31-May-07 1:43
moomoooomoo31-May-07 1:43 
GeneralRe: pls help... another question.... Pin
Rupesh Kumar Swami31-May-07 2:56
Rupesh Kumar Swami31-May-07 2:56 
GeneralRe: pls help... another question.... Pin
Guffa31-May-07 2:03
Guffa31-May-07 2:03 
GeneralRe: pls help... another question.... Pin
moomoooomoo31-May-07 2:13
moomoooomoo31-May-07 2:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.