Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Key Down event in Vb.net

Key Down event in Vb.net

Scheduled Pinned Locked Moved Visual Basic
csharptutorial
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rrrriiizz
    wrote on last edited by
    #1

    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

    J S 2 Replies Last reply
    0
    • R rrrriiizz

      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

      J Offline
      J Offline
      Jay Royall
      wrote on last edited by
      #2

      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).

      R 1 Reply Last reply
      0
      • R rrrriiizz

        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

        S Offline
        S Offline
        Suresh Suthar
        wrote on last edited by
        #3

        Instead of this

        rrrriiizz wrote:

        cmdverify_Click

        User

        cmdverify.PerformClick();

        Be an Eagle, Sky is Yours.

        1 Reply Last reply
        0
        • J Jay Royall

          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).

          R Offline
          R Offline
          rrrriiizz
          wrote on last edited by
          #4

          hi, have used this code in Vb 6.0 Only, Can you help me to provide some basic vb.net programming links.

          J D 2 Replies Last reply
          0
          • R rrrriiizz

            hi, have used this code in Vb 6.0 Only, Can you help me to provide some basic vb.net programming links.

            J Offline
            J Offline
            Jay Royall
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • R rrrriiizz

              hi, have used this code in Vb 6.0 Only, Can you help me to provide some basic vb.net programming links.

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              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...

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups