您当前的位置: 首页 >  c#

刘一哥GIS

暂无认证

  • 6浏览

    0关注

    918博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

C#的WebBrowser控件浏览网页

刘一哥GIS 发布时间:2015-03-13 23:40:02 ,浏览量:6

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace openUrl
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            string add = "";
            if (!(txtUrl.Text.Trim().StartsWith("http://")))
            {
                add = "http://" + txtUrl.Text.Trim();
                txtUrl.Text = add;
            }
            webBrowser1.Url = new Uri(add);
        }
    }
}
关注
打赏
1663688642
查看更多评论
立即登录/注册

微信扫码登录

0.0513s