Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: How to catch a key press on a form


Message #1 by "Dunaway, Cliff" <CliffDunaway@N...> on Thu, 25 Jul 2002 13:07:55 -0400
That is what I was looking for, Thanks!
______________________
Clif Dunaway

-----Original Message-----
From: Straforini, Marco [mailto:marco.straforini@c...]
Sent: Thursday, July 25, 2002 1:13 PM
To: professional vb
Subject: [pro_vb] RE: How to catch a key press on a form


Forms and UserControls (maybe UserDocuments?) have a KeyPreview property
set to False by default. If you set it to True, the form will catch
your events before the controls.

Marco

-----Original Message-----
From: Dunaway, Cliff [mailto:CliffDunaway@N...]
Sent: Thursday, July 25, 2002 10:08 AM
To: professional vb
Subject: [pro_vb] How to catch a key press on a form


I need to be able to detect a key press on a form. The form has only four
command buttons. If the user presses either ESCAPE of F4, I need to exit the
form. Any ideas how to do this? Possibly an API call?

Thanks in advance.
______________________
Clif Dunaway


---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills 
from Visual Basic 6 to C#, the language of choice 
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059


  Return to Index