CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2001
    Location
    Stuttgart, Germany
    Posts
    3

    Disable Enter Key on Command Button

    I have to create a message box that only responds to a mouse click on the command button; if the user presses the enter key, it shouldn't answer the command button. Can anyone help?


  2. #2

    Re: Disable Enter Key on Command Button


    private Sub Command1_KeyDown(KeyCode as Integer, Shift as Integer)
    'vbkeyenter=13
    if keycode=vbkeyenter then keycode=0
    End Sub




    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

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

Featured