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;
    }
}

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章