服务器:
QQServer.ServerIp = "127.0.0.1" '指定IP地址
QQServer.ServerPort = 52177 '指定登录端口
QQServer.HeartbeatInterval = 30 '指定心跳时间
QQServer.HeartbeatTimeout = 100 '指定心跳超时时间
QQserver.Buildin = True '启用内置身份验证
QQServer.Start() '启动QQServer
客户端登录按键:
QQClient.ServerIP = "127.0.0.1"
QQClient.ServerPort = 52177
QQClient.UserName = _UserName
QQClient.Password = _PW
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("QQClient登录失败,原因:" & vbcrlf & QQClient.ServerMessage,"提示",PopiconEnum.Error,5)
End If
客户端全局代码:
Public _UserName As String '用户名
Public _UserGroup As String '用户分组
Public _UserTable As DataTable '用户表
Public _UName As String '用户姓名
Public _Locallab As String '绑定实验室
Public _SaleID As String '业务代码
Public _DeptID As String '部门代码
Public _Author As String '授权名单
Public _PW As String '用户加密密码