Detect Idle Time

Detect Idle Time

am 15.11.2007 06:49:28 von 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

Re: Detect Idle Time

am 15.11.2007 07:03:52 von Allen Browne

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" wrote in message
news:473bddee$0$27641$afc38c87@news.optusnet.com.au...
>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
>

Re: Detect Idle Time

am 15.11.2007 07:24:02 von John Mishefske

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?
>

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
'--------------------------

Re: Detect Idle Time

am 15.11.2007 07:31:11 von Bob Darlington

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" wrote in message
news:473be14b$0$10708$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
> 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" wrote in message
> news:473bddee$0$27641$afc38c87@news.optusnet.com.au...
>>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
>>
>

Re: Detect Idle Time

am 15.11.2007 08:06:07 von Allen Browne

Perhaps you could create your own little dialog form, and open in in dialog
mode in the Timer event of your original form:
DoCmd.OpenForm "Form1", WindowMode:=acDialog

This new form could then have a default response in its own Timer event.

There's a few more details to sort out (to do with suppressing your dialog
being opened again immediately after), but that's the basic idea.

--
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" wrote in message
news:473be7b5$0$12806$afc38c87@news.optusnet.com.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" wrote in message
> news:473be14b$0$10708$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
>> 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
>>
>>
>> "Bob Darlington" wrote in message
>> news:473bddee$0$27641$afc38c87@news.optusnet.com.au...
>>>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

Re: Detect Idle Time

am 15.11.2007 08:25:20 von John Mishefske

> 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?
>

John Mishefske wrote:

> 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....
>

Some additional info including input from Albert Kallal:

http://discuss.fogcreek.com/joelonsoftware2/default.asp?cmd= show&ixPost=43806&ixReplies=21

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

Re: Detect Idle Time

am 15.11.2007 08:29:07 von Bob Darlington

Allen.
I am using a pop up form (as opposed to a message box) but I wasn't opening
it with acDialog.
So I changed it to a dialog, but it won't pop up when another application is
in use. It still skulks unseen under everything else.
I'm considering using a sound warning with a wave file to generate an alert
that the dialog is open.

--
Bob Darlington
Brisbane
"Allen Browne" wrote in message
news:473befe2$0$10708$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
> Perhaps you could create your own little dialog form, and open in in
> dialog mode in the Timer event of your original form:
> DoCmd.OpenForm "Form1", WindowMode:=acDialog
>
> This new form could then have a default response in its own Timer event.
>
> There's a few more details to sort out (to do with suppressing your dialog
> being opened again immediately after), but that's the basic idea.
>
> --
> 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" wrote in message
> news:473be7b5$0$12806$afc38c87@news.optusnet.com.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" wrote in message
>> news:473be14b$0$10708$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
>>> 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
>>>
>>>
>>> "Bob Darlington" wrote in message
>>> news:473bddee$0$27641$afc38c87@news.optusnet.com.au...
>>>>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
>

Re: Detect Idle Time

am 15.11.2007 09:13:39 von Allen Browne

Hmm: it worked in myt current version (Access 2007), Bob.

I did not set the form's Popup or Modal properties: just opened it acDialog.
With Access 2007 minimized to the task bar, the window poped up outside the
Access window.

--
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" wrote in message
news:473bf549$0$12806$afc38c87@news.optusnet.com.au...
> Allen.
> I am using a pop up form (as opposed to a message box) but I wasn't
> opening it with acDialog.
> So I changed it to a dialog, but it won't pop up when another application
> is in use. It still skulks unseen under everything else.
> I'm considering using a sound warning with a wave file to generate an
> alert that the dialog is open.
>
> --
> Bob Darlington
> Brisbane
> "Allen Browne" wrote in message
> news:473befe2$0$10708$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
>> Perhaps you could create your own little dialog form, and open in in
>> dialog mode in the Timer event of your original form:
>> DoCmd.OpenForm "Form1", WindowMode:=acDialog
>>
>> This new form could then have a default response in its own Timer event.
>>
>> There's a few more details to sort out (to do with suppressing your
>> dialog being opened again immediately after), but that's the basic idea.
>>
>> "Bob Darlington" wrote in message
>> news:473be7b5$0$12806$afc38c87@news.optusnet.com.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" wrote in message
>>> news:473be14b$0$10708$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
>>>> 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
>>>>
>>>>
>>>> "Bob Darlington" wrote in message
>>>> news:473bddee$0$27641$afc38c87@news.optusnet.com.au...
>>>>>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

Re: Detect Idle Time

am 15.11.2007 09:48:55 von Jebusville

"Bob Darlington" wrote in message
news:473bf549$0$12806$afc38c87@news.optusnet.com.au...
> Allen.
> I am using a pop up form (as opposed to a message box) but I wasn't
> opening it with acDialog.
> So I changed it to a dialog, but it won't pop up when another application
> is in use. It still skulks unseen under everything else.
> I'm considering using a sound warning with a wave file to generate an
> alert that the dialog is open.
>

That's going to make you very unpopular with your users. Can I as why you
want this functionality? Is it really necessary? There are ways to force
users out of an Access application if it's needed for maintenance purposes.
Would that suit your purposes?

Keith.
www.keithwilby.com

Re: Detect Idle Time

am 15.11.2007 11:27:25 von Bob Darlington

Keith,
I have users (using TS) who often leave their workstations without closing
the program, so that maintenance cannot be done. Some even forget that they
haven't saved an edit before leaving.
So they need to be kicked out.
But this thread is to do with making me less 'unpopular', by notifying them
in advance (if they're still at their desks) and giving them the opportunity
to continue.

--
Bob Darlington
Brisbane
"Keith Wilby" wrote in message
news:473c043c$1_1@glkas0286.greenlnk.net...
> "Bob Darlington" wrote in message
> news:473bf549$0$12806$afc38c87@news.optusnet.com.au...
>> Allen.
>> I am using a pop up form (as opposed to a message box) but I wasn't
>> opening it with acDialog.
>> So I changed it to a dialog, but it won't pop up when another application
>> is in use. It still skulks unseen under everything else.
>> I'm considering using a sound warning with a wave file to generate an
>> alert that the dialog is open.
>>
>
> That's going to make you very unpopular with your users. Can I as why you
> want this functionality? Is it really necessary? There are ways to force
> users out of an Access application if it's needed for maintenance
> purposes. Would that suit your purposes?
>
> Keith.
> www.keithwilby.com

Re: Detect Idle Time

am 15.11.2007 11:38:55 von Bob Darlington

Allen.
With Access minimised to the task bar, and only the desktop visible (ie
other apps minimised as well), it works fine. But, if the user is using
another app (eg Outlook) then it doesn't appear. This is using Access 2002
in Windows XP Pro.
I have tried setting it to a pop up modal and opening with acDialog.

--
Bob Darlington
Brisbane
"Allen Browne" wrote in message
news:473bffb6$0$10697$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
> Hmm: it worked in myt current version (Access 2007), Bob.
>
> I did not set the form's Popup or Modal properties: just opened it
> acDialog. With Access 2007 minimized to the task bar, the window poped up
> outside the Access window.
>
> --
> 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" wrote in message
> news:473bf549$0$12806$afc38c87@news.optusnet.com.au...
>> Allen.
>> I am using a pop up form (as opposed to a message box) but I wasn't
>> opening it with acDialog.
>> So I changed it to a dialog, but it won't pop up when another application
>> is in use. It still skulks unseen under everything else.
>> I'm considering using a sound warning with a wave file to generate an
>> alert that the dialog is open.
>>
>> --
>> Bob Darlington
>> Brisbane
>> "Allen Browne" wrote in message
>> news:473befe2$0$10708$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
>>> Perhaps you could create your own little dialog form, and open in in
>>> dialog mode in the Timer event of your original form:
>>> DoCmd.OpenForm "Form1", WindowMode:=acDialog
>>>
>>> This new form could then have a default response in its own Timer event.
>>>
>>> There's a few more details to sort out (to do with suppressing your
>>> dialog being opened again immediately after), but that's the basic idea.
>>>
>>> "Bob Darlington" wrote in message
>>> news:473be7b5$0$12806$afc38c87@news.optusnet.com.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" wrote in message
>>>> news:473be14b$0$10708$5a62ac22@per-qv1-newsreader-01.iinet.n et.au...
>>>>> 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
>>>>>
>>>>>
>>>>> "Bob Darlington" wrote in message
>>>>> news:473bddee$0$27641$afc38c87@news.optusnet.com.au...
>>>>>>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
>

Re: Detect Idle Time

am 15.11.2007 12:54:54 von Jebusville

"Bob Darlington" wrote in message
news:473c1f13$0$7134$afc38c87@news.optusnet.com.au...
> Keith,
> I have users (using TS) who often leave their workstations without closing
> the program, so that maintenance cannot be done. Some even forget that
> they haven't saved an edit before leaving.
> So they need to be kicked out.

So how about considering the functionality I suggested, the ability to kick
off all users at the push of a button and to keep them out until you've
finished what you need them out for?

> But this thread is to do with making me less 'unpopular', by notifying
> them in advance (if they're still at their desks) and giving them the
> opportunity to continue.
>

It was the prospect of a sound being played that I thought would make that
aspect unpopular. I don't understand why you're giving users the
opportunity to continue if you need them out. I have some code that will
achieve what I'm suggesting if you want it. You can target individual
users, individual machines, or all users and machines.

Regards,
Keith.

Re: Detect Idle Time

am 15.11.2007 14:26:43 von Ron2006

It is also possible to make the popup come out on top of other
applications, I use that method to warn users that new orders have
been assigned to them.

In Module put


Global Const HWND_TOPMOST = -1
Global Const SWP_NOSIZE = &H1
Global Const SWP_NOMOVE = &H2


Function TopMost()
Dim F As Form
Set F = Forms![Bessy]
Call SetWindowPos(F.hwnd, HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE Or SWP_NOSIZE)
End Function


In the ONLOAD of the form "Bessy" I execute the macro SETTOTOP

The Macro is coded as:

Execute the function TOPMOST()

======================
I believe I found this code by doing a search in the groups on
topmost or "on top" or something like that.

I believe the following is where I found it:


============================================================ ===================================

View Full Version : HYPERLINK "http://www.codeguru.com/forum/
showthread.php?t=232197"Making a form always on top

_____


ejj
02-20-2003, 03:05 PM
Public Declare Function SetWindowPos Lib "user32.dll" (ByVal hWnd As
Long, _
ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal
cx As Long, ByVal cy As Long, _
ByVal wFlags As Long) As Long

Public Const HWND_BOTTOM = 1
Public Const HWND_NOTOPMOST = -2
Public Const HWND_TOP = 0
Public Const HWND_TOPMOST = -1



retval = SetWindowPos(form1.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE
Or SWP_NOMOVE)


Something like that should do. This makes it topmost on the entire
system, which you may or may not want. Use HWND_TOP if you would
prefer just the top window in your application.

_____


vBulletin v3.0.7, Copyright (c)2000-2005, Jelsoft Enterprises Ltd.


==================================

Re: Detect Idle Time

am 16.11.2007 03:19:32 von Chuck Grimsby

On Thu, 15 Nov 2007 00:24:02 -0600, John Mishefske
wrote:

>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?
>>
>
>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....


http://support.microsoft.com/kb/254339


Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!

Re: Detect Idle Time

am 16.11.2007 03:19:32 von Chuck Grimsby

On Thu, 15 Nov 2007 15:49:28 +1000, "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?

The (oft posted) "Kick 'em Out" routine is the most common way to do
this.

Personally, I would just call the messagebox API directly with the
MB_SYSTEMMODAL option to have the application switch to Access. This
tends to *really* annoy users however, so I doubt I'd use it anymore.
(Common in applications written by programmers who feel *their*
application is the most important application running....)

Calling the messagebox API with MB_ICONEXCLAMATION or the
MB_ICONQUESTION option (Setting?) will cause the user's application
alert sound to occur, however in TS environments, it's fairly common
for sounds not to come across, so it's use is dubious.

Just use the SetTimer API call to cause the MessageBox API to go away
automatically. It will return the default setting of the MessageBox,
so set that accordingly to what return you want to happen if the user
doesn't press anything.

In this case however, all of the above is overkill. The "kick 'em
out" routine would be the preferred method. Arvin Meyer has a copy of
it at his site:




Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!

Re: Detect Idle Time

am 16.11.2007 07:40:35 von John Mishefske

Chuck Grimsby wrote:
> On Thu, 15 Nov 2007 00:24:02 -0600, John Mishefske
> wrote:
>
>> Bob Darlington wrote:
>>> 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?
>>>
>> 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....
>
>
> http://support.microsoft.com/kb/254339

Thanks Chuck.

For those interested in trying this code you should note that it was
meant for VB5/VB6 but will run unaltered in Access causing the form
that this code runs in to flash.

You can change the hWnd variable assignment to use the Application
Handle instead of the Handle to the form if you want Access itself to
flash (taskbar icon flashes):

' Fill the structure:
With FWInfo
.cbSize = Len(FWInfo) ' 20
'.hWnd = Me.hWnd ' flash the form
.hWnd = Application.hWndAccessApp ' flash the app
.dwFlags = FLASHW_ALL
.uCount = 5 ' number of times to flash
.dwTimeout = 0 ' how frequently (0 = default)
End With


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

Re: Detect Idle Time

am 20.11.2007 03:03:26 von Bob Darlington

Keith,
Thanks for the reply & sorry about the delay responding.
There are 2 situations. One, where I need to kick 'em out to do maintenance,
in which case they don't get the option. This one is working fine, and has
been for a number of years.
The second is where a user has been inactive and forgotten to close the app.
In this case, there is a risk that they have left unsaved edits which is
obviously not desirable. It's also a question of preserving network
resources. In this second case, I want to be able to give some sort of
warning. If they've left their desk, then they wont respond, and will be
kicked out after a number of seconds. But if they are still at their desk,
and in another application, I want to give them the chance to restart the
clock.
Hope that makes things clearer.
Does your code address this problem?

--
Bob Darlington
Brisbane
"Keith Wilby" wrote in message
news:473c2fd1$1_1@glkas0286.greenlnk.net...
> "Bob Darlington" wrote in message
> news:473c1f13$0$7134$afc38c87@news.optusnet.com.au...
>> Keith,
>> I have users (using TS) who often leave their workstations without
>> closing the program, so that maintenance cannot be done. Some even forget
>> that they haven't saved an edit before leaving.
>> So they need to be kicked out.
>
> So how about considering the functionality I suggested, the ability to
> kick off all users at the push of a button and to keep them out until
> you've finished what you need them out for?
>
>> But this thread is to do with making me less 'unpopular', by notifying
>> them in advance (if they're still at their desks) and giving them the
>> opportunity to continue.
>>
>
> It was the prospect of a sound being played that I thought would make that
> aspect unpopular. I don't understand why you're giving users the
> opportunity to continue if you need them out. I have some code that will
> achieve what I'm suggesting if you want it. You can target individual
> users, individual machines, or all users and machines.
>
> Regards,
> Keith.

Re: Detect Idle Time

am 20.11.2007 03:42:45 von lyle

On Nov 15, 9:19 pm, Chuck Grimsby
wrote:
> On Thu, 15 Nov 2007 15:49:28 +1000, "Bob Darlington"

> Personally, I would just call the messagebox API directly with the
> MB_SYSTEMMODAL option to have the application switch to Access. This
> tends to *really* annoy users however, so I doubt I'd use it anymore.
> (Common in applications written by programmers who feel *their*
> application is the most important application running....)

I would never knowingly buy or use an application that disrespects me
sufficiently to disturb my work with a message about idle time, or
shuts itself off.
Throughout an application development career of about twenty-five
years I have always emphasized confidence in and respect for the user
and I have never regretted doing so.

Re: Detect Idle Time

am 20.11.2007 05:12:25 von Tony Toews

lyle wrote:

>I would never knowingly buy or use an application that disrespects me
>sufficiently to disturb my work with a message about idle time, or
>shuts itself off.
>Throughout an application development career of about twenty-five
>years I have always emphasized confidence in and respect for the user
>and I have never regretted doing so.

However people are forgetful. Yes, we know they should cleanly exit but it simply
doesn't happen sometimes.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

Re: Detect Idle Time

am 20.11.2007 06:08:58 von Bob Darlington

Lyle,
I suppose it depends on whether:
a. You need to maintain your client data file on line
b. Your clients are all 'perfect' users.
Unfortunately, all my users don't fall into that category, so I'm seeking
some options.
I've found that provided I work through this type of problem with the
clients, I don't get any agro. As long as they know what is going on.
I'm talking about a small client base do it's possible to do it this way.

--
Bob Darlington
Brisbane
"lyle" wrote in message
news:d7e03d7e-7106-4752-85ad-b5d106b54d4e@w28g2000hsf.google groups.com...
> On Nov 15, 9:19 pm, Chuck Grimsby
> wrote:
>> On Thu, 15 Nov 2007 15:49:28 +1000, "Bob Darlington"
>
>> Personally, I would just call the messagebox API directly with the
>> MB_SYSTEMMODAL option to have the application switch to Access. This
>> tends to *really* annoy users however, so I doubt I'd use it anymore.
>> (Common in applications written by programmers who feel *their*
>> application is the most important application running....)
>
> I would never knowingly buy or use an application that disrespects me
> sufficiently to disturb my work with a message about idle time, or
> shuts itself off.
> Throughout an application development career of about twenty-five
> years I have always emphasized confidence in and respect for the user
> and I have never regretted doing so.
>

Re: Detect Idle Time

am 20.11.2007 09:38:16 von Jebusville

"Bob Darlington" wrote in message
news:47424072$0$25673$afc38c87@news.optusnet.com.au...
> Keith,
> Thanks for the reply & sorry about the delay responding.
> There are 2 situations. One, where I need to kick 'em out to do
> maintenance, in which case they don't get the option. This one is working
> fine, and has been for a number of years.
> The second is where a user has been inactive and forgotten to close the
> app. In this case, there is a risk that they have left unsaved edits which
> is obviously not desirable. It's also a question of preserving network
> resources. In this second case, I want to be able to give some sort of
> warning. If they've left their desk, then they wont respond, and will be
> kicked out after a number of seconds. But if they are still at their desk,
> and in another application, I want to give them the chance to restart the
> clock.
> Hope that makes things clearer.
> Does your code address this problem?
>

Hi Bob,

No it doesn't but I did used to have some code that does what you're after.
Unfortunately I discarded it years ago because I got too many complaints
from the end users. I will have a dig around to see if I can find it but
I'm not hopeful.

Regards,
Keith.

Re: Detect Idle Time

am 20.11.2007 11:15:38 von Bob Darlington

Thanks Chuck.
A Google search for 'Flash Taskbar' got a post from 'Salad' (27 Oct 2004 in
this ng) which does exactly what I wanted.
Thanks again for your help.

--
Bob Darlington
Brisbane
"Chuck Grimsby" wrote in message
news:efvpj3thfm5nfkm2ic8ve2jh188ei9g5hl@4ax.com...
> On Thu, 15 Nov 2007 00:24:02 -0600, John Mishefske
> wrote:
>
>>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?
>>>
>>
>>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....
>
>
> http://support.microsoft.com/kb/254339
>
>
> Please Post Any Replies To This Message Back To the Newsgroup.
> There are "Lurkers" around who can benefit by our exchange!

Re: Detect Idle Time

am 20.11.2007 11:18:43 von Bob Darlington

Thanks Keith.
Don't worry, I found exactly what I wanted using 'Flash Taskbar' posted to
this group in 2004.



--
Bob Darlington
Brisbane
"Keith Wilby" wrote in message
news:47429938$1_1@glkas0286.greenlnk.net...
> "Bob Darlington" wrote in message
> news:47424072$0$25673$afc38c87@news.optusnet.com.au...
>> Keith,
>> Thanks for the reply & sorry about the delay responding.
>> There are 2 situations. One, where I need to kick 'em out to do
>> maintenance, in which case they don't get the option. This one is working
>> fine, and has been for a number of years.
>> The second is where a user has been inactive and forgotten to close the
>> app. In this case, there is a risk that they have left unsaved edits
>> which is obviously not desirable. It's also a question of preserving
>> network resources. In this second case, I want to be able to give some
>> sort of warning. If they've left their desk, then they wont respond, and
>> will be kicked out after a number of seconds. But if they are still at
>> their desk, and in another application, I want to give them the chance to
>> restart the clock.
>> Hope that makes things clearer.
>> Does your code address this problem?
>>
>
> Hi Bob,
>
> No it doesn't but I did used to have some code that does what you're
> after. Unfortunately I discarded it years ago because I got too many
> complaints from the end users. I will have a dig around to see if I can
> find it but I'm not hopeful.
>
> Regards,
> Keith.