Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / KeyPressEvent.cs / 1 / KeyPressEvent.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Windows.Forms {
using System.Diagnostics;
using System;
using System.Drawing;
using System.ComponentModel;
using Microsoft.Win32;
///
///
///
/// Provides data for the
/// event.
///
///
[System.Runtime.InteropServices.ComVisible(true)]
public class KeyPressEventArgs : EventArgs {
///
///
/// Contains the character of the current KeyPress event.
///
private char keyChar;
///
///
/// Determines if this event has been handled by a handler. If handled, the
/// key event will not be sent along to Windows. If not handled, the event
/// will be sent to Windows for default processing.
///
private bool handled;
///
///
///
/// Initializes a new
/// instance of the
/// class.
///
///
public KeyPressEventArgs(char keyChar) {
this.keyChar = keyChar;
}
///
///
///
/// Gets the character corresponding to the key
/// pressed.
///
///
public char KeyChar {
get {
return keyChar;
}
set {
keyChar = value;
}
}
///
///
///
/// Gets or sets a value indicating whether the
/// event was handled.
///
///
public bool Handled {
get {
return handled;
}
set {
handled = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextAction.cs
- DateTimeFormatInfo.cs
- EndpointAddressElementBase.cs
- PriorityQueue.cs
- sqlinternaltransaction.cs
- WindowsContainer.cs
- COM2EnumConverter.cs
- CodeAssignStatement.cs
- BamlLocalizer.cs
- NetMsmqBinding.cs
- DrawListViewColumnHeaderEventArgs.cs
- EditBehavior.cs
- LinqDataSourceInsertEventArgs.cs
- OraclePermission.cs
- JulianCalendar.cs
- ErrorRuntimeConfig.cs
- TargetControlTypeAttribute.cs
- COMException.cs
- EntityTypeEmitter.cs
- NetPeerTcpBinding.cs
- Signature.cs
- Positioning.cs
- printdlgexmarshaler.cs
- TextParaLineResult.cs
- ConversionContext.cs
- AnimatedTypeHelpers.cs
- UIPropertyMetadata.cs
- UnrecognizedAssertionsBindingElement.cs
- ObjectContextServiceProvider.cs
- ApplicationManager.cs
- Pair.cs
- ListViewInsertionMark.cs
- TypeDescriptionProvider.cs
- dataobject.cs
- TabPanel.cs
- CompositionDesigner.cs
- DBSchemaRow.cs
- OdbcUtils.cs
- TypeConverterAttribute.cs
- StartUpEventArgs.cs
- securestring.cs
- AdapterSwitches.cs
- LocalizableAttribute.cs
- HttpClientCertificate.cs
- GridViewRowCollection.cs
- EnvelopedPkcs7.cs
- PresentationTraceSources.cs
- ValueSerializerAttribute.cs
- StyleBamlRecordReader.cs
- ECDiffieHellman.cs
- WebPartTransformerAttribute.cs
- Mapping.cs
- IsolatedStorageFile.cs
- HttpModuleAction.cs
- SrgsSemanticInterpretationTag.cs
- SQLBoolean.cs
- DataControlHelper.cs
- BitmapEffectOutputConnector.cs
- CompletedAsyncResult.cs
- StringWriter.cs
- BindingNavigator.cs
- TableMethodGenerator.cs
- CheckBoxStandardAdapter.cs
- Executor.cs
- CustomServiceCredentials.cs
- MarkupObject.cs
- ObjectListDataBindEventArgs.cs
- Pen.cs
- ComponentCollection.cs
- InputBinding.cs
- CuspData.cs
- UserMapPath.cs
- SQLDecimal.cs
- NameNode.cs
- EndPoint.cs
- COM2Enum.cs
- TransactedReceiveData.cs
- SerialReceived.cs
- DocumentReference.cs
- Attribute.cs
- XamlPathDataSerializer.cs
- DbConnectionFactory.cs
- DependencyPropertyChangedEventArgs.cs
- TableHeaderCell.cs
- SBCSCodePageEncoding.cs
- TouchDevice.cs
- XmlObjectSerializerWriteContextComplex.cs
- Vertex.cs
- StringUtil.cs
- SpellCheck.cs
- StrokeDescriptor.cs
- HttpListener.cs
- EventWaitHandleSecurity.cs
- TransformerTypeCollection.cs
- IndexerHelper.cs
- DeferredElementTreeState.cs
- XmlTextReader.cs
- NativeActivityFaultContext.cs
- DbConnectionStringCommon.cs
- WebEvents.cs