KeyDown Event Firing in VB.Net When No Key Is Pressed?

The best way of doing this is to override ProcesCmdKey for your form, like the example below: Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms. Message, keyData As System.Windows.Forms. Keys) As Boolean MessageBox.

Show("Pressed" & Convert. ToChar(keyData)) Return MyBase. ProcessCmdKey(msg, keyData) End Function Regards.

Well, I tried this and it is still firing. I commented out my KeyDown handler and put your function in. Again, on my Win 7 box, the event only fires when a key is pressed.

However, on my production XP box, the even fires when no key is pressed. – GregH Aug 20 at 15:58 If I just output "keyData. ToString" in the message box, I get the following: "Pressed LButton, OemClear" – GregH Aug 20 at 16:02.

Sometimes . Net controls fire on form or app initialization. Microsoft says this is "by design."

If you have a problem, you can use a flag variable to abort any processing in the keydown handler until the form is loaded.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions