检测空闲时间 [英] Detect Idle Time

查看:68
本文介绍了检测空闲时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个例程,用于检查空闲时间并打开一个弹出屏幕,建议

用户关闭它们。弹出窗口有一个用户选项

保持应用程序打开,在这种情况下,计时器重置为另一个

期间。

如果用户当时正在处理另一个应用程序,则会出现问题

弹出窗口被激活,在这种情况下无法看到它。

有没有办法转移重点回到我的访问应用程序,以便他们可以看到消息?

或者是否有另一个(更明显?)解决我的问题?
< br $>
-

Bob Darlington

布里斯班

I have a routine which checks idle time and opens a pop up screen to advise
users before shutting them down. The pop up has an option for the user to
keep the application open, in which case the timer is reset for another
period.
The problem occurs if the user is working on another application at the time
the pop up is activated, in which case it cannot be seen.
Is there any way to shift the focus back to my access app so that they can
see the message?
Or is there another (more obvious?) solution to my problem?

--
Bob Darlington
Brisbane

推荐答案

可以你打开MsgBox作为系统模式,Bob?


这适用于Access 2007:


Private Sub Form_Timer()

如果MsgBox(时间到了。好吗?,vbSystemModal + vbYesNo,退出)=

vbYes那么

''无论如何

结束如果

结束Sub

-

Allen Browne - 微软MVP。西澳大利亚珀斯

访问用户提示 - http:// allenbrowne .com / tips.html

回复群组,而不是mvps dot org的allenbrowne。


" Bob Darlington" < bo*@dpcmanAX.com.auwrote in message

news:47 *********************** @ news.optusnet .com.a u ...
Could you open the MsgBox as system modal, Bob?

This works in Access 2007:

Private Sub Form_Timer()
If MsgBox("Time''s up. Okay?", vbSystemModal + vbYesNo, "Quitting") =
vbYes Then
''whatever
End If
End Sub
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob Darlington" <bo*@dpcmanAX.com.auwrote in message
news:47***********************@news.optusnet.com.a u...

>我有一个例程,用于检查空闲时间并打开弹出屏幕,在关闭用户之前建议用户下。弹出窗口有一个选项供用户保持应用程序打开,在这种情况下,计时器将重置另一个
期间。

如果用户正在工作,则会出现问题在

时间的另一个应用程序弹出窗口被激活,在这种情况下它无法看到。

有没有办法将焦点转移到我的访问应用程序所以,他们可以

看到消息?

或者还有另一个(更明显的?)解决我的问题的方法吗?


- -

Bob Darlington

布里斯班
>I have a routine which checks idle time and opens a pop up screen to advise
users before shutting them down. The pop up has an option for the user to
keep the application open, in which case the timer is reset for another
period.
The problem occurs if the user is working on another application at the
time the pop up is activated, in which case it cannot be seen.
Is there any way to shift the focus back to my access app so that they can
see the message?
Or is there another (more obvious?) solution to my problem?

--
Bob Darlington
Brisbane


Bob Darlington写道:
Bob Darlington wrote:

我有一个例程来检查空闲时间并打开一个弹出屏幕,建议

用户关闭它们。弹出窗口有一个用户选项

保持应用程序打开,在这种情况下,计时器重置为另一个

期间。

如果用户当时正在处理另一个应用程序,则会出现问题

弹出窗口被激活,在这种情况下无法看到它。

有没有办法转移重点回到我的访问应用程序,以便他们可以看到消息?

或者是否有另一个(更明显?)解决我的问题?
I have a routine which checks idle time and opens a pop up screen to advise
users before shutting them down. The pop up has an option for the user to
keep the application open, in which case the timer is reset for another
period.
The problem occurs if the user is working on another application at the time
the pop up is activated, in which case it cannot be seen.
Is there any way to shift the focus back to my access app so that they can
see the message?
Or is there another (more obvious?) solution to my problem?



可能希望Access任务栏图标闪烁?查看此API:


私有声明功能FlashWindowEx Lib" user32" (pflashwininfo As

FLASHWINFO)很长


我确定有人用这个做了一些VB / VBA代码....


-

''--------------------------

''John Mishefske

''UtterAccess编辑器

''2007 Microsoft MVP

''------- -------------------

Probably want Access taskbar icon to flash? Check out this API:

Private Declare Function FlashWindowEx Lib "user32" (pflashwininfo As
FLASHWINFO) As Long

I''m sure someone has done some VB/VBA code with this....

--
''--------------------------
'' John Mishefske
'' UtterAccess Editor
'' 2007 Microsoft MVP
''--------------------------


谢谢Allen,

这样可以正常工作因为用户在他的办公桌前。但如果没有,它会停止

关闭例程退出。

有没有办法关闭未回答的消息框?


-

Bob Darlington

布里斯班

" Allen Browne" < Al ********* @ SeeSig.Invalidwrote in message

news:47 ********************* ** @ per-qv1-newsreader-01.iinet.net.au ...
Thanks Allen,
That works fine as long as the user is at his desk. But if not, it stops the
shutdown routine from quitting.
Is there any way to close an unanswered message box?

--
Bob Darlington
Brisbane
"Allen Browne" <Al*********@SeeSig.Invalidwrote in message
news:47***********************@per-qv1-newsreader-01.iinet.net.au...

你能打开MsgBox作为系统模式吗,Bob?


这适用于Access 2007:


Private Sub Form_Timer()

如果是MsgBox(时间了。好吗?",vbSystemModal + vbYesNo," Quitting")=

vbYes然后

''无论

结束如果

End Sub


-

Allen Browne - 微软MVP。西澳大利亚珀斯

访问用户提示 - http:// allenbrowne .com / tips.html

回复群组,而不是mvps dot org的allenbrowne。


" Bob Darlington" < bo*@dpcmanAX.com.auwrote in message

news:47 *********************** @ news.optusnet .com.a u ...
Could you open the MsgBox as system modal, Bob?

This works in Access 2007:

Private Sub Form_Timer()
If MsgBox("Time''s up. Okay?", vbSystemModal + vbYesNo, "Quitting") =
vbYes Then
''whatever
End If
End Sub
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob Darlington" <bo*@dpcmanAX.com.auwrote in message
news:47***********************@news.optusnet.com.a u...

>>我有一个例程,用于检查空闲时间并打开弹出屏幕,以便之前建议用户关闭他们。弹出窗口有一个选项供
用户保持应用程序打开,在这种情况下,计时器将重置另一个时间段。
如果用户正在处理另一个应用程序,则会出现问题弹出窗口被激活的时间,在这种情况下无法看到。
有没有办法将焦点转移到我的访问应用程序,以便他们可以看到消息?或者还有另一个(更明显的?)解决我的问题的方法吗?

-
Bob Darlington
布里斯班
>>I have a routine which checks idle time and opens a pop up screen to
advise users before shutting them down. The pop up has an option for the
user to keep the application open, in which case the timer is reset for
another period.
The problem occurs if the user is working on another application at the
time the pop up is activated, in which case it cannot be seen.
Is there any way to shift the focus back to my access app so that they
can see the message?
Or is there another (more obvious?) solution to my problem?

--
Bob Darlington
Brisbane



这篇关于检测空闲时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆