Code:
/ DotNET / DotNET / 8.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
- WebBrowserNavigatingEventHandler.cs
- SystemIcmpV6Statistics.cs
- ListControl.cs
- DataGridViewColumnHeaderCell.cs
- TableAutomationPeer.cs
- StackOverflowException.cs
- X509Certificate.cs
- CommittableTransaction.cs
- SessionEndingCancelEventArgs.cs
- ClusterSafeNativeMethods.cs
- DigestComparer.cs
- TransformPatternIdentifiers.cs
- SqlGatherProducedAliases.cs
- Int32AnimationBase.cs
- IdentitySection.cs
- TypeExtension.cs
- DbException.cs
- ScriptingWebServicesSectionGroup.cs
- CqlParser.cs
- LocalFileSettingsProvider.cs
- AutomationAttributeInfo.cs
- DataGridViewLayoutData.cs
- SQLGuid.cs
- EntityKey.cs
- ContentFileHelper.cs
- FontCacheUtil.cs
- TypeCodeDomSerializer.cs
- SecurityCapabilities.cs
- DataGridViewCellStateChangedEventArgs.cs
- TextModifierScope.cs
- CompilerErrorCollection.cs
- StylusPointCollection.cs
- SqlFormatter.cs
- SystemTcpStatistics.cs
- OutputCacheSettingsSection.cs
- Timeline.cs
- SerializationUtility.cs
- StrokeFIndices.cs
- DataGridViewRowPrePaintEventArgs.cs
- XmlSchemaComplexContentExtension.cs
- SqlUnionizer.cs
- FtpRequestCacheValidator.cs
- AsyncStreamReader.cs
- DataPager.cs
- PersonalizationProviderHelper.cs
- DbFunctionCommandTree.cs
- ISAPIApplicationHost.cs
- Int64KeyFrameCollection.cs
- DoubleLinkList.cs
- ResourceDictionary.cs
- recordstatefactory.cs
- _TransmitFileOverlappedAsyncResult.cs
- ToolStripItemEventArgs.cs
- DocumentXPathNavigator.cs
- Error.cs
- AppSettings.cs
- TraceContextRecord.cs
- FormClosingEvent.cs
- ImageAttributes.cs
- ServiceThrottlingBehavior.cs
- XamlClipboardData.cs
- RenameRuleObjectDialog.cs
- XmlDataSource.cs
- SelectedDatesCollection.cs
- GridViewUpdatedEventArgs.cs
- PackagePartCollection.cs
- ButtonDesigner.cs
- OrderByBuilder.cs
- ElementUtil.cs
- OrderPreservingSpoolingTask.cs
- CheckedPointers.cs
- HtmlInputHidden.cs
- DllHostedComPlusServiceHost.cs
- ServiceProviders.cs
- MenuStrip.cs
- EntitySqlQueryCacheEntry.cs
- SafeTimerHandle.cs
- RelationshipWrapper.cs
- _DomainName.cs
- ApplicationDirectory.cs
- JpegBitmapEncoder.cs
- ContentIterators.cs
- TransformValueSerializer.cs
- sitestring.cs
- CompositionAdorner.cs
- DataMemberConverter.cs
- TokenizerHelper.cs
- ContainerSelectorGlyph.cs
- PositiveTimeSpanValidatorAttribute.cs
- Line.cs
- IdentifierService.cs
- StateRuntime.cs
- CodeAttributeDeclarationCollection.cs
- ResourceContainer.cs
- ListViewUpdateEventArgs.cs
- DynamicILGenerator.cs
- AuthenticatedStream.cs
- DataGridViewLinkCell.cs
- StrokeCollection2.cs
- NestPullup.cs