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
- ItemContainerProviderWrapper.cs
- COAUTHIDENTITY.cs
- DelegatingConfigHost.cs
- FormViewUpdateEventArgs.cs
- StorageScalarPropertyMapping.cs
- Table.cs
- RuntimeIdentifierPropertyAttribute.cs
- RecognizeCompletedEventArgs.cs
- VersionUtil.cs
- XamlVector3DCollectionSerializer.cs
- EntityContainerEmitter.cs
- WorkflowViewStateService.cs
- DllHostedComPlusServiceHost.cs
- ReverseInheritProperty.cs
- CompensatableSequenceActivity.cs
- ScrollBarRenderer.cs
- JavaScriptSerializer.cs
- StrokeIntersection.cs
- AsymmetricAlgorithm.cs
- RegexParser.cs
- _StreamFramer.cs
- VerificationAttribute.cs
- SamlAuthenticationStatement.cs
- SecurityStateEncoder.cs
- QueryExpr.cs
- Pair.cs
- TextInfo.cs
- SerializationHelper.cs
- XmlQualifiedName.cs
- UIntPtr.cs
- SafeHandle.cs
- SliderAutomationPeer.cs
- recordstatefactory.cs
- PerspectiveCamera.cs
- CommandEventArgs.cs
- PageDeviceFont.cs
- UpDownEvent.cs
- CheckBoxBaseAdapter.cs
- HScrollProperties.cs
- ViewSimplifier.cs
- BreakRecordTable.cs
- FormViewUpdateEventArgs.cs
- ThemeConfigurationDialog.cs
- DtdParser.cs
- AutomationPeer.cs
- ContentPosition.cs
- HtmlInputText.cs
- DSASignatureDeformatter.cs
- TextTreeUndoUnit.cs
- ParallelForEach.cs
- FontFamilyValueSerializer.cs
- ConvertTextFrag.cs
- TCPListener.cs
- DataTableTypeConverter.cs
- QuadraticBezierSegment.cs
- Point3DAnimationBase.cs
- ScriptResourceInfo.cs
- CompensationDesigner.cs
- ThreadPool.cs
- DrawingBrush.cs
- SqlCrossApplyToCrossJoin.cs
- PersonalizablePropertyEntry.cs
- ExpressionConverter.cs
- ListViewCommandEventArgs.cs
- Animatable.cs
- HashHelper.cs
- IPHostEntry.cs
- WindowsSolidBrush.cs
- Border.cs
- XmlSchemaExternal.cs
- AdapterDictionary.cs
- IItemProperties.cs
- Hash.cs
- ConfigurationElement.cs
- CombinedGeometry.cs
- DbQueryCommandTree.cs
- EventWaitHandleSecurity.cs
- SessionSwitchEventArgs.cs
- ToolStripContentPanel.cs
- SimpleWorkerRequest.cs
- AutomationProperties.cs
- GroupBoxAutomationPeer.cs
- ALinqExpressionVisitor.cs
- Mutex.cs
- RequestCachePolicy.cs
- ClaimComparer.cs
- Int32Storage.cs
- InfoCardBaseException.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- SurrogateEncoder.cs
- CapacityStreamGeometryContext.cs
- ButtonColumn.cs
- SplayTreeNode.cs
- SmtpFailedRecipientException.cs
- WindowsButton.cs
- XmlUtf8RawTextWriter.cs
- MergeFilterQuery.cs
- SQLDateTime.cs
- DesignOnlyAttribute.cs
- PresentationTraceSources.cs