How to implement a screenlock
-
Hi Buddies, Could somebody help me in implementing a screenlock? What I'm trin' to do is, if the user is not interacting with the system for a stipulated time I need to lock the screen, thereby forcing the user to enter his password to unlock the system. Thanks to all in Advance
-
Hi Buddies, Could somebody help me in implementing a screenlock? What I'm trin' to do is, if the user is not interacting with the system for a stipulated time I need to lock the screen, thereby forcing the user to enter his password to unlock the system. Thanks to all in Advance
-
Hello, Fast solution: create a full screen TopMost window with passwordbox. All the best, Martin
funny :laugh::laugh:
When you get mad...THINK twice that the only advice Tamimi - Code
-
funny :laugh::laugh:
When you get mad...THINK twice that the only advice Tamimi - Code
-
Hi Buddies, Could somebody help me in implementing a screenlock? What I'm trin' to do is, if the user is not interacting with the system for a stipulated time I need to lock the screen, thereby forcing the user to enter his password to unlock the system. Thanks to all in Advance
Hi! The corresponding Win32 function is called
LockWorkStation
and located inuser32.dll
. You can simply use this code:using System.Runtime.InteropServices;
public class ScreenLock
{
[DllImport("user32.dll")]
public static extern bool LockWorkStation();
}Regards, mav -- Black holes are the places where God divided by 0...
-
Hi! The corresponding Win32 function is called
LockWorkStation
and located inuser32.dll
. You can simply use this code:using System.Runtime.InteropServices;
public class ScreenLock
{
[DllImport("user32.dll")]
public static extern bool LockWorkStation();
}Regards, mav -- Black holes are the places where God divided by 0...
thanks mav. But how do I know the system idle time? Does the API does it by itself(I hope no).....? If I use Application.Idle definitely its not gonna to work. Is there anything like System.Idle :D ? thanks once again for the help & still look forward to you suggestions...