11.WinForm练习--WebBrowser控件使用

namespace _11.WebBrowser使用
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

    private void button1_Click(object sender, EventArgs e)
    {
        //获得输入网址
        string text = textBox1.Text;
        Uri uri = new Uri("http://" + text);
        //将获得网址给WebBrowser
        webBrowser1.Url = uri;
    }
}

}

猜你喜欢

转载自blog.51cto.com/12679593/2398305