OpenQQ服务器端:
If QQserver.Users.Contains(e.UserName) Then
e.Message = "该用户已经登录,请勿重复登陆"
Return
End If
OpenQQ客户端登录按钮:
QQClient.ServerIP = "127.0.0.1" '指定服务器IP地址
QQClient.ServerPort = 52177 '指定服务器端口
QQClient.UserName = "用户名"
QQClient.Password = "密码"
If QQClient.Start() = True '如果登录成功
Dim msg As String = "恭喜,OpenQQ登录成功!"
If QQClient.ServerMessage > "" Then '如果服务器返回了欢迎信息
msg = msg & QQClient.ServerMessage
End If
PopMessage(msg,"提示",PopiconEnum.Infomation,5)
Else '如果登录失败,显示服务器返回错误信息
PopMessage("登录失败,原因:" & vbcrlf & QQClient.ServerMessage,"提示",PopiconEnum.Error,5)
Syscmd.Project.Exit()
End If