KeyPressEventArgs

KeyPressEventArgs

System. Windows .Forms (system. windows .forms.dll) class

Similar to the KeyEventArgs , this class encapsulates the data for the Control.KeyPress event.

You can simply retrieve the KeyChar corresponding to the key that was pressed. For example, pressing Shift-H would provide H, whereas pressing H would return h (of course, the Caps Lock key would change this).

 public class  KeyPressEventArgs  : EventArgs {  // Public Constructors  public  KeyPressEventArgs  (char  keyChar  );  // Public Instance Properties  public bool  Handled  {set; get; }    public char  KeyChar  {get; } } 

Hierarchy

System.Object System.EventArgs KeyPressEventArgs

Passed To

Control.OnKeyPress() , KeyPressEventHandler.{BeginInvoke() , Invoke()} , UpDownBase.OnTextBoxKeyPress()



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net