Hi,
I want to get an event if someone locks her/his computer so that I could do
some finalizations before actually locking the system. For example how can
I ensure that an user close a particular application before locking her/his
PC.
Thanks
Mukesh 5 2495
"Chakravarti Mukesh" <cm*****@sparshindia.com> wrote in message
news:Oo**************@TK2MSFTNGP10.phx.gbl...
| Hi,
|
| I want to get an event if someone locks her/his computer so that I could
do
| some finalizations before actually locking the system. For example how
can
| I ensure that an user close a particular application before locking
her/his
| PC.
|
Why would the latter be a requirement? Locking a session doesn't mean that
the user has done with it's applications.
Anyway, what you are looking for is not possible, you can't do anything
"before" the actual locking of a session.
Willy.
It may be that the application has a limited number of concurrent
licenses and users disappear of to lunch / meetings stopping other
people that need to have have access.
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... "Chakravarti Mukesh" <cm*****@sparshindia.com> wrote in message news:Oo**************@TK2MSFTNGP10.phx.gbl... | Hi, | | I want to get an event if someone locks her/his computer so that I could do | some finalizations before actually locking the system. For example how can | I ensure that an user close a particular application before locking her/his | PC. | Why would the latter be a requirement? Locking a session doesn't mean that the user has done with it's applications. Anyway, what you are looking for is not possible, you can't do anything "before" the actual locking of a session.
Willy.
Hi,
Suppose I have a software on which employees are working. Every time a user
logout from this software an entry goes to database that the user is not
working. Now I want to prevent situations when the user won't logout and
lock the system and walk on the terrace or worst leave to home.
Thanks
Mukesh
Hi,
Suppose I have a software on which employees are working. Every time a user
logout from this software an entry goes to database that the user is not
working. Now I want to prevent situations when the user won't logout and
lock the system and walk on the terrace or worst leave to home.
Thanks
Mukesh
"Chakravarti Mukesh" <cm*****@sparshindia.com> wrote in message
news:Oo**************@TK2MSFTNGP10.phx.gbl... Hi,
I want to get an event if someone locks her/his computer so that I could do some finalizations before actually locking the system. For example how can I ensure that an user close a particular application before locking her/his PC.
Thanks Mukesh
Well, the system does not generate an event when a session gets locked, a
session lock only switches the active desktop to the winlogon desktop and
waits for an unlock (CTRL+ALT+DEL SAS), so there is nothing you can here
(unless you are willing to write your own GINA), and it would not make sense
either, a session lock is meant to lock a session for "short" period of time
without the need to stop running applications. What would you do if the user
locks the session because he/she leaves for a couple of minutes only?
Only possibility I see is to use OnIdle processing to determine if the
application has been idling for a certain (configurable) amount of time, but
what if the user moves to another applications?.
Following may give you an idea how to proceed....
int idleEventCount, idleEventCountPrev;
...
InitializeComponent();
// Setup idle processing
Application.Idle += this.OnIdle;
timer1.Interval = 3000000; // minutes interval
// Enable timer.
timer1.Enabled = true;
timer1.Tick += new EventHandler(this.IdleTimerEventProcessor);
timer1.Start();
}
// Handler for the Idle application event.
private void OnIdle(object sender, System.EventArgs args)
{
// increment a counter each time the message queue is emptied.
idleEventCount++;
}
private void IdleTimerEventProcessor(Object myObject,
EventArgs myEventArgs)
{
timer1.Stop();
// if idleEventCount is only incremented by 4 or less (a simple
keyclick generates 4 messages, a timer event generates 2 messages),
// it means that the app. has been idle for a complete timer interval.
Beware that other Timers my increment the idlecount as well, so you may need
to increase the value of 4.
if ((idleEventCountPrev + 4) < idleEventCount)
{
idleEventCountPrev = idleEventCount;
timer1.Start();
}
else
{
// Clean-up and stop application...
Application.Exit();
}
Willy.
"Chakravarti Mukesh" <cm*****@sparshindia.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
| Hi,
| Suppose I have a software on which employees are working. Every time a
user
| logout from this software an entry goes to database that the user is not
| working. Now I want to prevent situations when the user won't logout and
| lock the system and walk on the terrace or worst leave to home.
| Thanks
| Mukesh
|
| "Chakravarti Mukesh" <cm*****@sparshindia.com> wrote in message
| news:Oo**************@TK2MSFTNGP10.phx.gbl...
| > Hi,
| >
| > I want to get an event if someone locks her/his computer so that I could
| > do some finalizations before actually locking the system. For example
how
| > can I ensure that an user close a particular application before locking
| > her/his PC.
| >
| > Thanks
| > Mukesh
| >
|
| This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rohit Raghuwanshi |
last post by:
Hello all,
we are running a delphi application with DB2 V8.01 which is causing
deadlocks when rows are being inserted into a table. Attaching the
Event Monitor Log (DEADLOCKS WITH DETAILS) here....
|
by: Rod |
last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some
reason, opening some ASP.NET applications we wrote is producing the
following error message:
"The Web server reported...
|
by: Fredrik Melin |
last post by:
Same problem that I had before, diffrent approach..
In my application at order-creation, the user might encounter that the item
he is trying to order is locked by another user, and he have to...
|
by: Jack Russell |
last post by:
My unstanding of all VB up to and including vb6 is that an event could
not "interrupt" itself.
For instance if you had a timer event containing a msgbox then you would
only get one message.
...
|
by: brandon |
last post by:
Anybody out there know how I could go about handling, in a systray'd
app, the windows message that the desktop is going to be locked? This
way the application can react whenever the Win+L or...
|
by: Carlo \(mcp\) |
last post by:
Good morning
I have this lines:
AddHandler MyControl1.Parent.Paint, AddressOf PaintParentHandler
AddHandler MyControl2.Parent.Paint, AddressOf PaintParentHandler
AddHandler...
|
by: shorti |
last post by:
Hello all,
I am running with DB2 UDB V8 on AIX.
I am trying to track down what appears to be a lock issue. I turned
EVENT MONITOR on with all the options. It doesnt give me the detailed...
|
by: Harry |
last post by:
Hi All
VS 2008 Pro
It appears that the form_closing event of a form may not always fire. I put
an explicit lock on a customer record when it is open for edit and then
remove the lock in the...
|
by: Tom P. |
last post by:
You wouldn't think this would be as hard as it is but for some reason
I can't find a way to translate any of the codes in the
KeyDownEventArgs into the actual characters they represent.
The best...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
| |