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
- ContentHostHelper.cs
- MatrixValueSerializer.cs
- SoapWriter.cs
- GC.cs
- MenuAdapter.cs
- SpeechAudioFormatInfo.cs
- MethodImplAttribute.cs
- MergeFailedEvent.cs
- KeyEvent.cs
- Operator.cs
- DataServiceRequestException.cs
- WsatTransactionFormatter.cs
- TagPrefixCollection.cs
- DataBinder.cs
- RegionInfo.cs
- SemaphoreFullException.cs
- SiteMapDataSourceView.cs
- CompareValidator.cs
- DeploymentExceptionMapper.cs
- Lasso.cs
- DictionaryCustomTypeDescriptor.cs
- BindingContext.cs
- Clipboard.cs
- DesignRelation.cs
- XPathMessageContext.cs
- FixedPosition.cs
- DesignerActionUIStateChangeEventArgs.cs
- StyleTypedPropertyAttribute.cs
- xsdvalidator.cs
- PkcsMisc.cs
- _FixedSizeReader.cs
- WebRequest.cs
- MembershipUser.cs
- AttributeEmitter.cs
- SmtpMail.cs
- FixedSOMPage.cs
- WebControl.cs
- RoleService.cs
- Compiler.cs
- xsdvalidator.cs
- ListBoxItem.cs
- SynchronizationHandlesCodeDomSerializer.cs
- ArcSegment.cs
- XmlSerializerFactory.cs
- GPPOINT.cs
- BindUriHelper.cs
- Path.cs
- RepeaterItemCollection.cs
- BufferedGraphicsManager.cs
- PageContent.cs
- PropertyTabChangedEvent.cs
- CodeTypeDeclaration.cs
- EndpointDiscoveryBehavior.cs
- CharEntityEncoderFallback.cs
- XXXOnTypeBuilderInstantiation.cs
- CodeCommentStatement.cs
- Fx.cs
- RequestCacheValidator.cs
- ByteStreamMessageEncodingElement.cs
- TextFormatter.cs
- Misc.cs
- activationcontext.cs
- DataServiceClientException.cs
- XmlMemberMapping.cs
- DataReaderContainer.cs
- SharedUtils.cs
- ExpressionBindingsDialog.cs
- ADMembershipUser.cs
- FilterableAttribute.cs
- DoneReceivingAsyncResult.cs
- ClientType.cs
- SyndicationDeserializer.cs
- XdrBuilder.cs
- NameValueCache.cs
- AdornerHitTestResult.cs
- XmlDataLoader.cs
- linebase.cs
- _FtpControlStream.cs
- WindowsRichEdit.cs
- Vector3DAnimationUsingKeyFrames.cs
- WindowCollection.cs
- TemplateNodeContextMenu.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- TextSimpleMarkerProperties.cs
- Selection.cs
- LinqDataSource.cs
- Expr.cs
- Attributes.cs
- RootNamespaceAttribute.cs
- BinHexEncoder.cs
- MemberRelationshipService.cs
- Vector3DCollectionConverter.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- FrameDimension.cs
- LinqDataView.cs
- ProfileGroupSettings.cs
- WarningException.cs
- ReachNamespaceInfo.cs
- References.cs
- XmlCharCheckingWriter.cs