Hello, is there a way to create a .exe or button in C# to do the same as WIN+L? Thanks
Asked
Active
Viewed 111 times
1 Answers
1
You can use the following:
//using System.Runtime.InteropServices;
[DllImport("user32", SetLastError = true)]
static extern bool LockWorkStation();
And then just call within your button_Click
:
LockWorkStation();

cramopy
- 3,459
- 6
- 28
- 42