新的游戏大厅已经Fix了这个BUG
现将代码公布,抛转引玉!
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices;
using System.Threading;//Thread;
using System.Management;
//using CustomUIControls;
//using System.Net;
using System.IO;
//using System.Xml;
//using Sloppycode.net;
namespace QQ自动登录器
...{
/**//// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
...{
[DllImport("user32.dll")]
static extern bool SetCursorPos(int X, int Y);
//模拟鼠标
private readonly int MOUSEEVENTF_LEFTDOWN = 0x2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label3;
int NUM=9999;
int N=0;
string MP1="",MP2="";
public string Url="";
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Timer waittimer;
private System.Windows.Forms.Button button3;
private readonly int MOUSEEVENTF_LEFTUP = 0x4;
[DllImport("user32")]
public static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo);
//--------
[DllImport("user32.dll")]
static extern void keybd_event(
byte bVk,
byte bScan,
uint dwFlags,
uint dwExtraInfo
);
private System.Windows.Forms.Button autologinbutton;
private System.ComponentModel.IContainer components;
public Form1()
...{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/**//// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
...{
if( disposing )
...{
if (components != null)
...{
components.Dispose();
}
}
base.Dispose( disposing );
}
Windows 窗体设计器生成的代码#region Windows 窗体设计器生成的代码
/**//// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
...{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.autologinbutton = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox();
this.button1 = new System.Windows.Forms.Button();
this.textBox3 = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.waittimer = new System.Windows.Forms.Timer(this.components);
this.button3 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// autologinbutton
//
this.autologinbutton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.autologinbutton.Location = new System.Drawing.Point(336, 344);
this.autologinbutton.Name = "autologinbutton";
this.autologinbutton.Size = new System.Drawing.Size(96, 24);
this.autologinbutton.TabIndex = 0;
this.autologinbutton.Text = "单个登录";
this.autologinbutton.Click += new System.EventHandler(this.autologinbutton_Click);
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(72, 344);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(256, 21);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "";
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.Location = new System.Drawing.Point(16, 344);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 23);
this.label1.TabIndex = 2;
this.label1.Text = "QQ号";
//
// textBox2
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox2.Location = new System.Drawing.Point(72, 376);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(256, 21);
this.textBox2.TabIndex = 3;
this.textBox2.Text = "";
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label2.Location = new System.Drawing.Point(16, 376);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(40, 23);
this.label2.TabIndex = 4;
this.label2.Text = "密码";
//
// listBox1
//
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listBox1.ItemHeight = 12;
this.listBox1.Location = new System.Drawing.Point(24, 56);
this.listBox1.Name = "listBox1";
this.listBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listBox1.Size = new System.Drawing.Size(304, 268);
this.listBox1.TabIndex = 5;
this.listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick);
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices;
using System.Threading;//Thread;
using System.Management;
//using CustomUIControls;
//using System.Net;
using System.IO;
//using System.Xml;
//using Sloppycode.net;
namespace QQ自动登录器
...{
/**//// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
...{
[DllImport("user32.dll")]
static extern bool SetCursorPos(int X, int Y);
//模拟鼠标
private readonly int MOUSEEVENTF_LEFTDOWN = 0x2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label3;
int NUM=9999;
int N=0;
string MP1="",MP2="";
public string Url="";
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Timer waittimer;
private System.Windows.Forms.Button button3;
private readonly int MOUSEEVENTF_LEFTUP = 0x4;
[DllImport("user32")]
public static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo);
//--------
[DllImport("user32.dll")]
static extern void keybd_event(
byte bVk,
byte bScan,
uint dwFlags,
uint dwExtraInfo
);
private System.Windows.Forms.Button autologinbutton;
private System.ComponentModel.IContainer components;
public Form1()
...{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/**//// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
...{
if( disposing )
...{
if (components != null)
...{
components.Dispose();
}
}
base.Dispose( disposing );
}
Windows 窗体设计器生成的代码#region Windows 窗体设计器生成的代码
/**//// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
...{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.autologinbutton = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox();
this.button1 = new System.Windows.Forms.Button();
this.textBox3 = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.waittimer = new System.Windows.Forms.Timer(this.components);
this.button3 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// autologinbutton
//
this.autologinbutton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.autologinbutton.Location = new System.Drawing.Point(336, 344);
this.autologinbutton.Name = "autologinbutton";
this.autologinbutton.Size = new System.Drawing.Size(96, 24);
this.autologinbutton.TabIndex = 0;
this.autologinbutton.Text = "单个登录";
this.autologinbutton.Click += new System.EventHandler(this.autologinbutton_Click);
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(72, 344);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(256, 21);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "";
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.Location = new System.Drawing.Point(16, 344);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 23);
this.label1.TabIndex = 2;
this.label1.Text = "QQ号";
//
// textBox2
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox2.Location = new System.Drawing.Point(72, 376);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(256, 21);
this.textBox2.TabIndex = 3;
this.textBox2.Text = "";
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label2.Location = new System.Drawing.Point(16, 376);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(40, 23);
this.label2.TabIndex = 4;
this.label2.Text = "密码";
//
// listBox1
//
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listBox1.ItemHeight = 12;
this.listBox1.Location = new System.Drawing.Point(24, 56);
this.listBox1.Name = "listBox1";
this.listBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listBox1.Size = new System.Drawing.Size(304, 268);
this.listBox1.TabIndex = 5;
this.listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick);
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top