Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
KeyPress Event not fire on CapsLock
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
KeyPress Event not fire on CapsLock
Divers
Thread ID:
00981293
Message ID:
00981293
Vues:
62
I have the following code:
private void MainForm_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
 if ((int)e.KeyChar == (int)Keys.CapsLock){MessageBox.Show("Caps Lock On");}
}
And the KeyPreview is set to True.
However, when I press CapsLock key this does not fire. It does fire if press a letter key.
Why?

TIA
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform