当前位置:编程学习 > C#/ASP.NET >>

C#编写检测QQ状态是否在线实例代码

C#查询QQ状态是否在线实例代码如下:
private void button3_Click(object sender, System.EventArgs e)
{
        if(textBox3.Text=="")
        {
                MessageBox.Show("必须填写当前的查询的QQ号码!","错误提示!");
                textBox3.Focus();
                return;   
        } else {
                string strQQ=textBox3.Text.Trim();
                string strSearchQQ="http://wpa.qq.com/pa?p=1:" strQQ ":3";
                string strQQStatus=GetWebContent(strSearchQQ).Substring(0,7);
                switch(strQQStatus)
                {
                        case "GIF89aK":MessageBox.Show(strQQ "不在线","QQ状态提示!");
                        break;
                        case "GIF89aJ":MessageBox.Show(strQQ "在线","QQ状态提示!");
                        break;          
                }
        }
}
补充:软件开发 , C# ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,