Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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.
//
//-----------------------------------------------------------------------------
/*
*/
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlCaseSimplifier.cs
- FormatterConverter.cs
- SmiContextFactory.cs
- DbConnectionPool.cs
- Button.cs
- SharedPersonalizationStateInfo.cs
- DataBoundControlActionList.cs
- ExportOptions.cs
- WebPartConnectionsCancelVerb.cs
- SqlNotificationEventArgs.cs
- FillRuleValidation.cs
- TextElementEnumerator.cs
- RTLAwareMessageBox.cs
- XslTransformFileEditor.cs
- BuilderElements.cs
- MexTcpBindingCollectionElement.cs
- Base64Stream.cs
- DiagnosticsConfiguration.cs
- ViewLoader.cs
- SqlUdtInfo.cs
- FlowLayoutSettings.cs
- IPEndPointCollection.cs
- BaseUriHelper.cs
- RelationshipEndCollection.cs
- RowBinding.cs
- LinqDataSourceDeleteEventArgs.cs
- TableProviderWrapper.cs
- CodeDelegateCreateExpression.cs
- StreamWithDictionary.cs
- LocatorPartList.cs
- MatrixValueSerializer.cs
- _NegoStream.cs
- NamespaceList.cs
- ExtendedPropertyCollection.cs
- ACE.cs
- AsymmetricSecurityProtocolFactory.cs
- MenuTracker.cs
- TokenFactoryCredential.cs
- InternalUserCancelledException.cs
- UnsignedPublishLicense.cs
- Transform.cs
- uribuilder.cs
- VirtualizingStackPanel.cs
- StringBlob.cs
- UIElementCollection.cs
- SQLBinary.cs
- FileSecurity.cs
- GAC.cs
- DataBindingCollectionConverter.cs
- WebBrowsableAttribute.cs
- DataGridViewRowHeaderCell.cs
- SqlReferenceCollection.cs
- FlowNode.cs
- XmlArrayItemAttributes.cs
- XmlAttributeAttribute.cs
- ApplicationTrust.cs
- AssociationSet.cs
- RSAProtectedConfigurationProvider.cs
- AsyncContentLoadedEventArgs.cs
- BitmapEffectInput.cs
- Soap12ServerProtocol.cs
- ComponentDispatcher.cs
- TextRangeAdaptor.cs
- HandlerFactoryCache.cs
- SubqueryRules.cs
- Evidence.cs
- OleDbWrapper.cs
- ProcessModelInfo.cs
- NumericUpDownAccelerationCollection.cs
- RTLAwareMessageBox.cs
- UniqueIdentifierService.cs
- DbParameterCollection.cs
- SessionChannels.cs
- ThreadAbortException.cs
- LayoutEditorPart.cs
- HashFinalRequest.cs
- HatchBrush.cs
- SourceLineInfo.cs
- DataExpression.cs
- WebServiceHandlerFactory.cs
- BuildProvidersCompiler.cs
- ToolStripSettings.cs
- Repeater.cs
- UpdateManifestForBrowserApplication.cs
- WFItemsToSpacerVisibility.cs
- LinqDataSourceEditData.cs
- SplineKeyFrames.cs
- RenderCapability.cs
- ProgressBarAutomationPeer.cs
- RoutedEventHandlerInfo.cs
- OutputCacheSection.cs
- DataGridViewCellStateChangedEventArgs.cs
- ObjectStateFormatter.cs
- DSASignatureDeformatter.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- DataRow.cs
- LogicalExpressionEditor.cs
- AttributeSetAction.cs
- Point.cs
- BounceEase.cs