grip003 Posted November 27, 2007 Posted November 27, 2007 I am trying to capture the CAPS and NUMLOCK keys in an MDI application. I have set the KeyPreview to true and coded the KeyDown event. The problem occurs when a dialog form is being shown. The KeyPreview does not seem to fire when using a dialog form (using ShowDialog()). Is there a way around this without having to add code to every form that is brought up as a dialog form? Quote
mooman_fl Posted November 27, 2007 Posted November 27, 2007 Just off the top of my head, and maybe someone has a better idea, I would make a class with a method that holds the code you want in your KeyDown event. Just call that method from the KeyDown handler on each of the dialogs rather than repeating the whole code. Quote "Programmers are tools for converting caffeine into code." Madcow Inventions -- Software for the Sanity Challenged.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.