Hi ....

i want to track the Windows Lock Event.
when user lock the windows by any possible way, i want to run my code at that event.
but i don't know what is the event for this.

any Ideas?
Kind Regards,
saurabh

dear btech_Saurabh,

can you explain what windows locks you talk about?

1 - lock desctop (windows+L).

2 - system events

3- windows is crashed due to process ear the memory or CPU utilization.

if you mean the event where a user presses windows+L or ctrl+alt+del+lock do a google on windows hooks and locking screen

check Microsoft.Win32.SafeHandles Namespace link

The Microsoft.Win32.SafeHandles namespace contains classes that are abstract derivations of safe handle classes that provide common functionality supporting file and operating system handles.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.