webBrowser控件实现自动登录Gmail邮件的实例
来源:互联网 发布:简单的tab js切换代码 编辑:程序博客网 时间:2024/06/05 16:21
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Url = new Uri("http://www.gmail.com");
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
HtmlElement txtUserHtml = webBrowser1.Document.All["Email"];
HtmlElement txtPasswordHtml = webBrowser1.Document.All["Passwd"];
HtmlElement btnClickHtml = webBrowser1.Document.All["signIn"];
txtUserHtml.SetAttribute("value", "这里填写用户名");//输入用户名
txtPasswordHtml.SetAttribute("value", "这里填写密码");//输入密码
btnClickHtml.InvokeMember("click");
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Url = new Uri("http://www.gmail.com");
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
HtmlElement txtUserHtml = webBrowser1.Document.All["Email"];
HtmlElement txtPasswordHtml = webBrowser1.Document.All["Passwd"];
HtmlElement btnClickHtml = webBrowser1.Document.All["signIn"];
txtUserHtml.SetAttribute("value", "这里填写用户名");//输入用户名
txtPasswordHtml.SetAttribute("value", "这里填写密码");//输入密码
btnClickHtml.InvokeMember("click");
}
}
}
- webBrowser控件实现自动登录Gmail邮件的实例
- VS2005中使用webBrowser控件实现自动登录Gmail邮件的实例
- VS2005中使用webBrowser控件实现自动登录Gmail邮件的实例
- delphi : webbrowser实现自动登录
- JAVA实现Gmail收发邮件实例
- MFC利用webbrowser控件实现简单的自动登陆
- 在WebBrowser控件中实现自动登录并跳转到指定页面
- 利用WebBrowser控件实现百度自动搜索
- 利用WebBrowser控件实现百度自动搜索
- 利用WebBrowser控件实现百度自动搜索
- WebBrowser自动登录
- phpmailer发送gmail邮件实例
- 编写程序自动登录Gmail
- 编写程序自动登录Gmail
- vb里面 如何实现 webbrowser控件打开的页面的自动保存呢
- javamail实现gmail收发邮件
- WebBrowser编程-自动登录操作
- WinForm控制Webbrowser自动登录
- 文件上传
- MD5加密
- 数据一行变多行的SQL查询
- c#接收电子邮件类
- .NET开发中的一些小技巧
- webBrowser控件实现自动登录Gmail邮件的实例
- 在 Google Earth 上贴的地图
- sql
- 维尔京群岛
- linux sed 批量替换多个文件中的字符串
- 登录Gmail邮箱的HTML的网页
- 组合,关联,聚合的区别
- 截取字符串的一些东东
- 一个三十岁中国男人的婚姻思考 转帖