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

  • 相关阅读:
    关于 __bridge
    关于loadView
    关于ViewDidUnload
    55. Jump Game(中等)
    54. Spiral Matrix(中等)
    48. Rotate Image(中等)
    34. Search for a Range
    18. 4Sum(中等)
    16. 3Sum Closest(中等)
    41. First Missing Positive(困难, 用到 counting sort 方法)
  • 原文地址:https://www.cnblogs.com/java20130723/p/3211554.html
Copyright © 2011-2022 走看看