以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助] popMessage 关闭导致所在窗口关闭  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=165253)

--  作者:zcgmxf
--  发布时间:2021/5/11 23:40:00
--  [求助] popMessage 关闭导致所在窗口关闭

老师 ,下列代码我放在窗口的afterload   当popMessage弹窗关闭后,导致所在窗口紧跟就关闭。谢谢!

 

If QQClient.Ready Then
    MessageBox.show("QQClient已经启动,请先关闭","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
QQClient.ServerIP = "8.8.8.8"
QQClient.ServerPort = 52177  \'指定服务器端口
If user.Type = UserTypeEnum.User Then \'如果是普通用户
    QQClient.UserName ="市场部.服务器"
    QQClient.Password = "888"
End If
If QQClient.Start() = True \'如果登录成功
    Dim msg As String =  "信息交流平台登录成功!"
    popMessage(msg,"提示",PopiconEnum.Infomation,1)
Else \'如果登录失败,显示服务器返回错误信息
    MessageBox.Show("服务器未启动!","提示",MessageBoxButtons.AbortRetryIgnore,MessageBoxIcon.Error)
    \'Syscmd.Project.Exit(False)
End If

[此贴子已经被作者于2021/5/11 23:41:21编辑过]

--  作者:hongsejiyi
--  发布时间:2021/5/12 6:52:00
--  
If QQClient.Ready Then
    MessageBox.show("QQClient已经启动,请先关闭","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return  (是不是这个应该去掉)
End If

--  作者:有点蓝
--  发布时间:2021/5/12 8:57:00
--  
不要使用模式窗口。

或者模式窗口不要把代码放到afterload,放到一个登录按钮里
[此贴子已经被作者于2021/5/12 8:58:42编辑过]