all groups > dotnet windows forms > january 2005 >
You're in the

dotnet windows forms

group:

Kyepreview with combo box...


Re: Kyepreview with combo box... Bruce Wood
1/31/2005 10:19:01 AM
dotnet windows forms:
I know that this isn't the answer you're looking for, but I feel
compelled to ask why you're making your application act this way?

Your app will work differently from every other application on a
Windows platform, and different from browser forms on the Web. Won't
that confuse your users, when they find that the Enter key does
something different in your application?
Kyepreview with combo box... Ansari
1/31/2005 10:31:44 AM
Hi All,

I have a simple requriement... I want then whenever a user press enter on a
form in moves to next control... For that purpose I wrote following code in
Form's KeyDown event and sets Form's Keypreview property to true...

Private Sub frmBHEntry_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown

If e.KeyCode = Keys.Enter Then
SendKeys.Send("{Tab}")
End If

End Sub

It work fine for textboxes and other controls but It does not work for combo
box control... Why???

Thanks in advance

Ansari

AddThis Social Bookmark Button