登录按钮代码如下:
'先打开QQ服务器----------------------------------------------
If SysInfo.ComputerName = "yaxxx" Then
Dim ps As System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName("QQserver")
If ps.length = 0 Then
Dim fl As String = "\\-----------\Publish\QQserver.exe"
Dim Proc As New Process '定义一个新的Process
Proc.File = fl '指定要打开的文件
Proc.Start()
End If
End If
'下面设置打开QQ客户端 代码---------------------------------
If QQClient.Ready Then
MessageBox.show("QQClient已经启动,请先关闭","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If
QQClient.ServerIP = e.Form.Controls("txtIP").Value '指定服务器IP地址
QQClient.ServerPort = e.Form.Controls("txtPort").Value '指定服务器端口
QQClient.UserName =dr("部门") & "." & e.Form.Controls("UserName").Value '指定登录用户名
QQClient.Password = e.Form.Controls("PassWord").Value
If QQClient.Start() = True '如果登录成功
e.Form.Controls("btnChat").Enabled = True
Dim msg As String = "恭喜,OpenQQ登录成功!"