Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2005

Tip: Looking for answers? Try searching our database.

Kyepreview with combo box...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ansari - 31 Jan 2005 05:31 GMT
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
Bruce Wood - 31 Jan 2005 18:19 GMT
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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.