Results 1 to 2 of 2

Thread: KeyEvents

  1. #1

    Thread Starter
    Hyperactive Member vbzero's Avatar
    Join Date
    Aug 2000
    Location
    Vienna
    Posts
    347

    Question KeyEvents

    In Visual Basic 6; Under the KeyPressEvent of a textbox:

    VB Code:
    1. Select Case KeyAscii
    2.  
    3. Case vbKey0 To vbKey9
    4.  
    5. KeyAscii = KeyAscii
    6.  
    7. Case Else
    8.  
    9. KeyAscii = 0
    10.  
    11. End Select

    In C#????

    e.KeyChar is read only

    Any ideas?

    thx!

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Setting the
    VB Code:
    1. e.Handled = True
    will ignore the pressed Key
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width