.net c# 判断系统长时间未使用,则锁定计算机.只需要一段简单的代码即可.
[DllImport("user32.dll")] private static extern void LockWorkStation(); private void zbtnlock_Click(object sender, EventArgs e) { LockWorkStation(); }