Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8549115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:39:05+00:00 2026-06-11T13:39:05+00:00

I made a quick web browser in vb.net, I have it so that when

  • 0

I made a quick web browser in vb.net, I have it so that when you press enter it navigates to the webpage in textbox1. The only thing is that it beeps everytime I press enter. I tried using e.Handled = True, but it hasn’t done anything. Here is my code for the keypress

Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown

    If e.KeyCode = Keys.Enter Then
        e.Handled = True
        WebBrowser1.Navigate(TextBox1.Text)
    End If

End Sub

I thought e.Handled would have made that annoying beep go away, but it hasn’t.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:39:06+00:00Added an answer on June 11, 2026 at 1:39 pm

    The KeyEventArgs Property that you are wanting is not Handled but SuppressKeyPress.

    i.e.

    Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
        If e.KeyCode = Keys.Enter Then
            e.SuppressKeyPress = True
            WebBrowser1.Navigate(TextBox1.Text)
        End If
    
    End Sub
    

    From the first MSDN Link:

    Handled is implemented differently by different controls within Windows Forms. For controls like TextBox which subclass native Win32 controls, it is interpreted to mean that the key message should not be passed to the underlying native control. If you set Handled to true on a TextBox, that control will not pass the key press events to the underlying Win32 text box control, but it will still display the characters that the user typed.

    If you want to prevent the current control from receiving a key press, use the SuppressKeyPress property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a quick fiddle: http://jsfiddle.net/tLLB4/ Ok, so the premise is, i'm hovering
I have made a quick fiddle to outline my problem: http://jsfiddle.net/mYdxw/ I'm trying to
I have a .Net 3.5 web service that installs perfectly on my old XP
I have made an application that is receiving location data from a few web
I was looking at ASP.NET MVC 4 and it appears that System.Web.SiteMapProvider doesn't have
Just a quick questions.. I have made an outlook add-in for 2007 version and
I made a Web service in which I have a function to count some
I have made a quick Jsbin: http://jsbin.com/ujabew/edit#javascript,html,live What i'm trying to achieve is to
I have one question. I made quick search on the site, but don't found
I've made a quick python script that converts to Unicode from ASCII and back.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.