Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / MouseEvent.cs / 1 / MouseEvent.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; ////// /// [System.Runtime.InteropServices.ComVisible(true)] public class MouseEventArgs : EventArgs { ////// Provides data for the ///, /// , and /// events. /// /// /// Which button generated this event [if applicable] /// private readonly MouseButtons button; ////// /// If the user has clicked the mouse more than once, this contains the /// count of clicks so far. /// private readonly int clicks; ////// /// The x portion of the coordinate where this event occurred. /// private readonly int x; ////// /// The y portion of the coordinate where this event occurred. /// private readonly int y; private readonly int delta; ////// /// public MouseEventArgs(MouseButtons button, int clicks, int x, int y, int delta) { Debug.Assert((button & (MouseButtons.Left | MouseButtons.None | MouseButtons.Right | MouseButtons.Middle | MouseButtons.XButton1 | MouseButtons.XButton2)) == button, "Invalid information passed into MouseEventArgs constructor!"); this.button = button; this.clicks = clicks; this.x = x; this.y = y; this.delta = delta; } ////// Initializes a new instance of the ///class. /// /// /// public MouseButtons Button { get { return button; } } ////// Gets which mouse button was pressed. /// ////// /// public int Clicks { get { return clicks; } } ////// Gets the /// number of times the mouse /// button was pressed and released. /// ////// /// public int X { get { return x; } } ////// Gets the x-coordinate /// of a mouse click. /// ////// /// public int Y { get { return y; } } ////// Gets the y-coordinate of a mouse click. /// ////// /// public int Delta { get { return delta; } } ////// Gets /// a signed count of the number of detents the mouse wheel has rotated. /// ////// /// public Point Location { get { return new Point(x,y); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved./// Gets the location of the mouse during MouseEvent. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InvariantComparer.cs
- RuntimeCompatibilityAttribute.cs
- TableAutomationPeer.cs
- TabItem.cs
- ViewValidator.cs
- DropShadowEffect.cs
- CompiledRegexRunner.cs
- DummyDataSource.cs
- AppDomainUnloadedException.cs
- Parallel.cs
- UncommonField.cs
- WebRequestModuleElement.cs
- TextParentUndoUnit.cs
- SystemIPGlobalProperties.cs
- XpsS0ValidatingLoader.cs
- GlobalItem.cs
- RNGCryptoServiceProvider.cs
- SwitchLevelAttribute.cs
- XmlTextReaderImpl.cs
- mil_sdk_version.cs
- ComponentEvent.cs
- LogEntrySerializationException.cs
- NetworkInformationException.cs
- HttpConfigurationContext.cs
- DocumentViewerAutomationPeer.cs
- TdsRecordBufferSetter.cs
- SyndicationCategory.cs
- TextWriter.cs
- ISessionStateStore.cs
- IsolatedStorage.cs
- RegexMatchCollection.cs
- XmlMtomReader.cs
- HyperLinkStyle.cs
- _AcceptOverlappedAsyncResult.cs
- RectangleGeometry.cs
- LabelInfo.cs
- Authorization.cs
- MemberDomainMap.cs
- Journaling.cs
- WindowCollection.cs
- EditorPart.cs
- ApplicationActivator.cs
- XmlWriter.cs
- RegexCapture.cs
- XamlTemplateSerializer.cs
- Msec.cs
- IProducerConsumerCollection.cs
- HotCommands.cs
- GridViewRowEventArgs.cs
- CompiledQueryCacheEntry.cs
- _LazyAsyncResult.cs
- AccessViolationException.cs
- ControlPaint.cs
- XmlTextWriter.cs
- PackageController.cs
- ReturnEventArgs.cs
- InvokeProviderWrapper.cs
- UntypedNullExpression.cs
- EntityProviderFactory.cs
- Misc.cs
- KeyTimeConverter.cs
- DesignerTransaction.cs
- ModuleBuilderData.cs
- CircleHotSpot.cs
- ResourceBinder.cs
- HttpProtocolImporter.cs
- ResXFileRef.cs
- MouseButtonEventArgs.cs
- SerializationAttributes.cs
- UriSectionReader.cs
- RegexGroup.cs
- ControlBindingsConverter.cs
- TdsParameterSetter.cs
- AdornerDecorator.cs
- RelationshipConverter.cs
- CodeTypeMemberCollection.cs
- ByteAnimationBase.cs
- WebPartConnection.cs
- UrlPropertyAttribute.cs
- ProgressBarAutomationPeer.cs
- DashStyle.cs
- ComplexBindingPropertiesAttribute.cs
- FileRegion.cs
- MatrixCamera.cs
- ObjectViewListener.cs
- LoadRetryHandler.cs
- ConfigurationElementProperty.cs
- SafeNativeMethods.cs
- XmlKeywords.cs
- Action.cs
- Action.cs
- ProxyWebPart.cs
- RoleServiceManager.cs
- TreeBuilderXamlTranslator.cs
- SessionEndedEventArgs.cs
- HtmlHistory.cs
- DbParameterHelper.cs
- QualifierSet.cs
- DataBinding.cs
- EventLogException.cs