I have a WebBrowser control hosted in a windows Form. The control is used to display hyperlinks which get created at runtime. These links point to
WebBrowser
Form
This is my solution
private void txtAdres_KeyPress(object sender, KeyPressEventArgs e) { int licznik = 1; if (e.KeyChar == (char)13) { string adres = txtAdres.Text; webBrowser1.Navigate(adres); licznik = 0; } if (licznik == 0) { webBrowser1.Focus(); } }