Results 1 to 2 of 2

Thread: Strange SuppressKeyPress

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2009
    Posts
    216

    Strange SuppressKeyPress

    Hi !
    I have the following problem : I want to supress a key for a textbox :

    vb.net Code:
    1. If e.KeyCode = 66 Then ' B Key
    2.             e.SuppressKeyPress = True
    3.             e.Handled = True
    4.         End If

    this is working, B key is supressed,but adding just a messagebox will not work :

    vb.net Code:
    1. If e.KeyCode = 66 Then ' B Key
    2.             e.SuppressKeyPress = True
    3.             e.Handled = True
    4.      MessageBox.Show("OK")
    5.         End If

    Why ?
    Thank !

  2. #2
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    Re: Strange SuppressKeyPress

    Frns.. Any one gone through this ?? today, I have also came across same situation and facing same problem...i'm able to get message.. but the supress property is not working.. is there any rivalry b/w messagebox & Suppresskey ??
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

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