Key Down event in Vb.net
-
Hi all, Have small doubt in keydown event: in Vb6.0 i have worked with key down Event code but it is not working in vb.net; can any one guide me reg this please
Private Sub Txtpack_KeyDown(KeyCode AS Integer, Shift As Integer)
If KeyCode = 13 Then
cmdverify_Click
End If
End Sub -
Hi all, Have small doubt in keydown event: in Vb6.0 i have worked with key down Event code but it is not working in vb.net; can any one guide me reg this please
Private Sub Txtpack_KeyDown(KeyCode AS Integer, Shift As Integer)
If KeyCode = 13 Then
cmdverify_Click
End If
End SubIs this the code you're using in VB.NET or VB6? To use it in .NET the first thing you need to do is to add an Handles clause to the method's signature (unless you've added an event handler somewhere else in your code, of course).
-
Hi all, Have small doubt in keydown event: in Vb6.0 i have worked with key down Event code but it is not working in vb.net; can any one guide me reg this please
Private Sub Txtpack_KeyDown(KeyCode AS Integer, Shift As Integer)
If KeyCode = 13 Then
cmdverify_Click
End If
End SubInstead of this
rrrriiizz wrote:
cmdverify_Click
User
cmdverify.PerformClick();
Be an Eagle, Sky is Yours.
-
Is this the code you're using in VB.NET or VB6? To use it in .NET the first thing you need to do is to add an Handles clause to the method's signature (unless you've added an event handler somewhere else in your code, of course).
-
hi, have used this code in Vb 6.0 Only, Can you help me to provide some basic vb.net programming links.
Well for your particular problem this page seems to to explain it fairly well http://visualbasic.about.com/od/learnvbnet/a/eventhandler.htm[^] If you are new to programming in general and not just to .NET, then I would suggest reading some basic tutorials, there are tons to choose from.
-
hi, have used this code in Vb 6.0 Only, Can you help me to provide some basic vb.net programming links.
Pick up a book on beginning VB.NET. You're not going to find a single web page that describes all of the concepts you need in a step-by-step organized manner. You'll find all kinds of pages that describe single concepts and constructs, but inconsistently and without anything tying those concepts together.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...