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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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;
    }
}

}

以上是关于11.WinForm练习--WebBrowser控件使用的主要内容,如果未能解决你的问题,请参考以下文章