zoukankan      html  css  js  c++  java
  • C# WebBrowser的使用

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


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


            private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
            {
                if (e.KeyChar==(char)13)
                {
                    webBrowser1.Navigate(textBox1.Text);
                }
            }


            private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
            {
                WebBrowser wb = new WebBrowser();
                wb.Navigate("http://www.baidu.com");
            }


            private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
            {
                textBox1.Text = webBrowser1.Url.ToString();
                this.Text = webBrowser1.DocumentTitle.ToString();
            }
        }
    }
  • 相关阅读:
    hdoj1856
    hdoj1009
    hdoj2191
    hdoj1203
    hdoj1053
    hdoj1529
    hdoj1829
    Flex2 Tree从XML文件中加载数据
    RoR:Ruby On Rails 的 Web Service
    Flex2 数据的验证方法以及如何改变错误提示的CSS
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434767.html
Copyright © 2011-2022 走看看