zoukankan      html  css  js  c++  java
  • 新建Web浏览器

    using System;
    using System.Windows.Forms;

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

            private void button1_Click(object sender, EventArgs e)
            {
                Uri address = new Uri(textBox1.Text);//创建uri类型变量,存储浏览网页地址
                webBrowser1.Url = address;

            }

            private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
            {
                if (e.KeyChar == 13)//如果按下的是Enter键
                {
                    if (textBox1.Text!="")
                    {
                        button1_Click(sender, e);
                    }
                }
            }
           
        }
    }

    感谢来访,共同学习!
  • 相关阅读:
    浮动
    导航
    Json
    节点
    评论框
    WebClient 指定出口 IP
    IIS8 下 JS, CSS 等静态文件出现 500 错误
    使用 ffmpeg 转换 mov 视频
    使用 ildasm 和 ilasm 修改程序集的的引用信息
    2020-01-08 工作日记:无题
  • 原文地址:https://www.cnblogs.com/dingxiaowei/p/3058836.html
Copyright © 2011-2022 走看看