Form1の全コード
using System;
using System.Windows.Forms;
namespace WebBrowser1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void TextBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
WebBrowser1.ScriptErrorsSuppressed = true;
WebBrowser1.Navigate(TextBox1.Text);
}
}
private void WebBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
TextBox1.Text = WebBrowser1.Url.ToString();
String Title = WebBrowser1.DocumentTitle;
}
}
}