挂机锁屏软件,功能强大。开始挂机后,只有输入密码 才能进行操作,否则禁止任何操作。,解锁密码默认是:123456
using System;using System.Diagnostics;using System.Reflection;using System.Runtime.InteropServices;using System.Threading;using System.Windows.Forms;using CCWin;namespace WindowsLockDemo{ public partial class FrmMain : Form { [DllImport("user32.dll", EntryPoint = "PostMessage")] public static extern int PostMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); public const int WM_SYSCOMMAND = 0x112; public const int SC_MINIMIZE = 0xF020; public const int SC_MAXIMIZE = 0xF030; public FrmMain() { InitializeComponent(); } private void skinButton1_Click(object sender, EventArgs e) { if (skinTextBox1.Text.Trim().Equals("") || skinTextBox2.Text.Trim().Equals("")) { MessageBoxEx.Show("锁频密码不能为空或确认密码不能为空!"); return; } if (skinTextBox1.Text.Trim().Length < 6) { MessageBoxEx.Show("锁频密码不能小于6位字符!"); skinTextBox1.Text = ""; skinTextBox2.Text = ""; skinTextBox1.Focus(); return; } if (skinTextBox1.Text.Trim() != skinTextBox2.Text.Trim()) { MessageBoxEx.Show("锁频密码和确认密码不一致!"); skinTextBox2.Text = ""; skinTextBox2.Focus(); return; } UserInfo.UserPassword = skinTextBox2.Text.Trim(); this.Hide(); FrmBack frmBack = new FrmBack(); //打开解锁界面 frmBack.Show(); } private void FrmMain_FormClosed(object sender, FormClosedEventArgs e) { System.Environment.Exit(0); } }}
评论