I've a ScreenLocker winform application. It's full-screen and transparent. It unlocks the screen when user presses Ctrl+Alt+Shift+P.
But I want it more dynamic. I would like to let a user set his own password in a config file.
For example, he set his password mypass. My problem is- how can I track whether he typed 'mypass' on that form?
Help please.
Here is my current code-
public frmMain()
{
InitializeComponent();
this.KeyPreview = true;
this.WindowState = FormWindowState.Normal;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Bounds = Screen.PrimaryScreen.Bounds;
this.ShowInTaskbar = false;
double OpacityValue = 4.0 / 100;
this.Opacity = OpacityValue;
}
private void OnKeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.P && e.Modifiers == (Keys.Control | Keys.Shift | Keys.Alt))
{
this.Close();
}
}
Aucun commentaire:
Enregistrer un commentaire