General discussion

  • Creator
    Topic
  • #2102924

    key combinations in vb6

    Locked

    by adn523 ·

    does anybody know how i would go about executing an Alt+(any number on the numpad like 92) so it would print the relevant ascii character. never mind why i would wanna do that but if there is a way, i would sure be glad to know about it. please include the complete details. i shall be obliged. thanks.

All Comments

  • Author
    Replies
    • #3815091

      key combinations in vb6

      by rsv ·

      In reply to key combinations in vb6

      HI,
      Where u want the relevant ascii character to be printed and on what action do u want it to execute? Here I am giving me two methods,
      1.First Method: Write this code
      Private Sub Form_KeyPress(KeyAscii As Integer)
      MsgBox Chr(KeyAscii)
      End Sub

      Focus on form and then Press Alt + (any number on the numpad), then you will get the messagebox with that relevant ascii character

      2.Second Method:
      Place a text box on the form, and run the form and put focus on textbox (cursor in textbod) and then press Alt + (any numbers on the numpad), then that relevant ascii character will be displayed in the textbox.

      Hepoe this helps you.
      GOOD LUCK…:)

Viewing 0 reply threads