以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  关于锁屏问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=107826)

--  作者:裴保民
--  发布时间:2017/10/11 1:58:00
--  关于锁屏问题

我在SystemIdle事件中写了如下代码:

 

If LastInputTickCount >30000 Then
If Forms("系统锁定窗体").Opened=False And Forms("系统登录窗体").Opened=False And xianshitishi=True Then
 Forms("系统锁定窗体").Show
 Forms("系统锁定窗体").TopMost = True
End If
End If

 

这样的代码哪里有问题,怎么运行时有的时候起作用有的时候不起作用呢?

[此贴子已经被作者于2017/10/11 8:08:21编辑过]

--  作者:有点甜
--  发布时间:2017/10/11 8:51:00
--  

msgbox弹出所有的值看看咯

 

msgbox(Forms("系统锁定窗体").Opened & " " & Forms("系统登录窗体").Opened & " " & xianshitishi)


--  作者:裴保民
--  发布时间:2017/10/11 11:12:00
--  
把代码写到哪调试?
--  作者:有点甜
--  发布时间:2017/10/11 11:52:00
--  

If LastInputTickCount >30000 Then
    output.show(Forms("系统锁定窗体").Opened & " " & Forms("系统登录窗体").Opened & " " & xianshitishi)
    If Forms("系统锁定窗体").Opened=False And Forms("系统登录窗体").Opened=False And xianshitishi=True Then
        Forms("系统锁定窗体").Show
        Forms("系统锁定窗体").TopMost = True
    End If
End If

 

打开命令窗口,看结果

 

http://www.foxtable.com/webhelp/scr/2642.htm