Is there a way to get a standard Windows Forms application to detect if the Shift key is being held down on application startup - without using Windows hooks?
I ideally would like the workflow to change from normal if the shift key is held down when the EXE file is run.
The ModifierKeys property looks ideal:
private void Form1_Load(object sender, EventArgs e)
{
if ( (ModifierKeys & Keys.Shift) != 0)
{
MessageBox.Show("Shift is pressed");
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With