How can I limit to only few keystrokes inside my application and no mouse events?

How can I limit to only few keystrokes inside my application and no mouse events?

Hi. I want to limit to only few keystrokes inside my application and no mouse events. I am able to override the ProcessDialogKey method but I am not able to activate other events.

For example: When I press F1 key, I want to call a button's _Click subroutine. I also want to stop anyone from using mouse inside my application. Can you suggest a solution?

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to provide a unique online resource for developers, architects and development managers tasked with building and maintaining enterprise applications using Visual Basic, C# and the Microsoft .NET platform.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchWinDevelopment.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWinDevelopment.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

I hate to do this, but I'm not going to answer your question. Part of the major success of Windows is that applications conform to consistent user interface standards across all applications. If your application eats the mouse and does not handle keystrokes the same as any other application, you're making it much for difficult for your users. I would strongly suggest that you look at ways you can design your application so that it conforms to accepted user interface standards. For more information, see the book Microsoft Windows User Experience (Microsoft Press, 1999).

This was first published in April 2003