这是一个VB.NET语言制作的一 个关于QQ在线状态的 web service引用功能应用实例Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label3.Text = "" End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim qq As cn.com.webxml.ws1.MobileCodeWS = New cn.com.webxml.ws1.MobileCodeWS() Dim qqNumber As String = "" If String.IsNullOrEmpty(TextBox1.Text.Trim()) = False Then qqNumber = TextBox1.Text.Trim() End If Dim userid As String = "" If String.IsNullOrEmpty(TextBox2.Text.Trim()) = False Then userid = ":" & TextBox2.Text.Trim() End If Dim result As String = qq.getMobileCodeInfo(qqNumber, userid) TextBox3.Text = result If result = "Y" Then Label3.Text = qqNumber & " 在线" ElseIf result = "N" Then Label3.Text = qqNumber & " 离线" ElseIf result = "E" Then Label3.Text = qqNumber & " 号码错误" ElseIf result = "A" Then Label3.Text = "商业用户验证失败" ElseIf result = "V" Then Label3.Text = "免费用户超过数量" End If End SubEnd Class
评论