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;
using mshtml;namespace WF1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
object Zero = 0;
object EmptyString = "";
axWebBrowser1.Navigate(textBox1.Text, ref Zero, ref EmptyString, ref EmptyString, ref EmptyString);
} private void axWebBrowser1_NewWindow2_1(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e)
{
Form1 from = new Form1();
e.cancel = true;
e.ppDisp = from.axWebBrowser1.Application;
from.Show();
from.textBox1.Text = "df";
}
}
}
==============================================================================================
上面是我的简易浏览器的代码。但是怎样可以知道用户点击哪个超链接,然后把超链接保存到一个值中。
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using mshtml;namespace WF1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
object Zero = 0;
object EmptyString = "";
axWebBrowser1.Navigate(textBox1.Text, ref Zero, ref EmptyString, ref EmptyString, ref EmptyString);
} private void axWebBrowser1_NewWindow2_1(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e)
{
Form1 from = new Form1();
e.cancel = true;
e.ppDisp = from.axWebBrowser1.Application;
from.Show();
from.textBox1.Text = "df";
}
}
}
==============================================================================================
上面是我的简易浏览器的代码。但是怎样可以知道用户点击哪个超链接,然后把超链接保存到一个值中。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货