Results 1 to 2 of 2

Thread: keys

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Kitchener, Ontario, Canada
    Posts
    3

    Post

    I was wondering if there was a way to diable the enter button while a rich text box was in focus.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Sure. In RichTextBox's KeyPress event put this:

    Code:
    Private Sub RichTextBox1_KeyPress(KeyAscii As Integer)
        If KeyAscii = 13 Then
            KeyAscii = 0
        End If
    End Sub
    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

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