using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using mshtml;
namespace WebBrowser
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private AxSHDocVw.AxWebBrowser axWebBrowser1;
private System.Windows.Forms.TextBox textBox1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null; public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent(); //
// TODO: Add any constructor code after InitializeComponent call
//
} /// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.axWebBrowser1 = new AxSHDocVw.AxWebBrowser();
this.textBox1 = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).BeginInit();
this.SuspendLayout();
//
// axWebBrowser1
//
this.axWebBrowser1.Enabled = true;
this.axWebBrowser1.Location = new System.Drawing.Point(64, 40);
this.axWebBrowser1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWebBrowser1.OcxState")));
this.axWebBrowser1.Size = new System.Drawing.Size(300, 150);
this.axWebBrowser1.TabIndex = 4;
this.axWebBrowser1.DownloadComplete += new System.EventHandler(this.axWebBrowser1_DownloadComplete);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(80, 216);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 5;
this.textBox1.Text = "";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(528, 373);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.textBox1,
this.axWebBrowser1});
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).EndInit();
this.ResumeLayout(false); }
#endregion /// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
} private void Form1_Load(object sender, System.EventArgs e)
{
object Zero = 0;
object EmptyString = ""; axWebBrowser1.Navigate("http://xml.sz.luohuedu.net/xml/Content.asp",ref Zero, ref EmptyString, ref EmptyString, ref EmptyString);
}
private void axWebBrowser1_DownloadComplete(object sender, System.EventArgs e)
{
IHTMLDocument2 HTMLDocument =(IHTMLDocument2) axWebBrowser1.Document;
HTMLDocument.body.style.overflow = "hidden";
this.textBox1.Text = "ok";
} }
}
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using mshtml;
namespace WebBrowser
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private AxSHDocVw.AxWebBrowser axWebBrowser1;
private System.Windows.Forms.TextBox textBox1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null; public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent(); //
// TODO: Add any constructor code after InitializeComponent call
//
} /// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.axWebBrowser1 = new AxSHDocVw.AxWebBrowser();
this.textBox1 = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).BeginInit();
this.SuspendLayout();
//
// axWebBrowser1
//
this.axWebBrowser1.Enabled = true;
this.axWebBrowser1.Location = new System.Drawing.Point(64, 40);
this.axWebBrowser1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWebBrowser1.OcxState")));
this.axWebBrowser1.Size = new System.Drawing.Size(300, 150);
this.axWebBrowser1.TabIndex = 4;
this.axWebBrowser1.DownloadComplete += new System.EventHandler(this.axWebBrowser1_DownloadComplete);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(80, 216);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 5;
this.textBox1.Text = "";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(528, 373);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.textBox1,
this.axWebBrowser1});
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).EndInit();
this.ResumeLayout(false); }
#endregion /// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
} private void Form1_Load(object sender, System.EventArgs e)
{
object Zero = 0;
object EmptyString = ""; axWebBrowser1.Navigate("http://xml.sz.luohuedu.net/xml/Content.asp",ref Zero, ref EmptyString, ref EmptyString, ref EmptyString);
}
private void axWebBrowser1_DownloadComplete(object sender, System.EventArgs e)
{
IHTMLDocument2 HTMLDocument =(IHTMLDocument2) axWebBrowser1.Document;
HTMLDocument.body.style.overflow = "hidden";
this.textBox1.Text = "ok";
} }
}
解决方案 »
- 在datagrid里加入checkbox,为什么选不选都是false啊?
- 打开word后怎样只能使用word本身退出
- DataGirdView实现Sql2005的一个功能(有难度)
- 重装了IIS,要aspnet_regiis.exe -i来重新安装IIS,但是没有SDK命令提示,在cmd里面也提示不是内部命令。怎么来做呢
- 好心的人帮帮忙啊!
- 怎么让鼠标的下方出现说明文字?
- 高分求:WebDeployment生成时错误,缺少using指令
- 怎样获取script写的模板中的值
- 用webrequest抓取网页实时数据,可能是由于对方服务器缓存的关系,第二次第三次抓取的数据不会变化
- 最优化的拟牛顿BFGS方法
- 知道一个对象的指针,如何取得具体的对象啊?
- 请问怎样向datagrid手工添加数据,而不是读取数据库。
private void axWebBrowser1_DownloadComplete(object sender, System.EventArgs e)
{
IHTMLDocument2 HTMLDocument =(IHTMLDocument2) axWebBrowser1.Document;
HTMLDocument.body.style.overflow = "hidden";}