您的位置:首页 > 编程语言 > C#

c#查询QQ状态是否在线查询代码

2007-10-20 16:04 316 查看
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;
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: