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
- IsolatedStorage.cs
- PolygonHotSpot.cs
- SeekableMessageNavigator.cs
- SQLInt16Storage.cs
- PrimitiveRenderer.cs
- InfoCardProofToken.cs
- ResourceCategoryAttribute.cs
- OverflowException.cs
- TreeViewItem.cs
- ResourceKey.cs
- VBIdentifierTrimConverter.cs
- SystemMulticastIPAddressInformation.cs
- InvokeMemberBinder.cs
- CompiledQueryCacheEntry.cs
- MSAAEventDispatcher.cs
- TableSectionStyle.cs
- ImageDrawing.cs
- CalloutQueueItem.cs
- DataRecordInternal.cs
- _NtlmClient.cs
- MappingModelBuildProvider.cs
- SqlDataSourceEnumerator.cs
- SHA256Managed.cs
- DocumentXmlWriter.cs
- AnnotationResourceChangedEventArgs.cs
- CurrentChangingEventManager.cs
- TextBoxRenderer.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- NameTable.cs
- BitSet.cs
- ControlAdapter.cs
- PlaceHolder.cs
- ResizeBehavior.cs
- DispatcherFrame.cs
- XmlHierarchyData.cs
- UIElement3DAutomationPeer.cs
- StandardCommands.cs
- OrthographicCamera.cs
- AnnotationStore.cs
- AdapterUtil.cs
- TableLayoutCellPaintEventArgs.cs
- IdentifierService.cs
- BaseCollection.cs
- AlphaSortedEnumConverter.cs
- NativeWindow.cs
- WebPartConnectionsCancelVerb.cs
- DataGridViewAdvancedBorderStyle.cs
- PieceDirectory.cs
- EntitySqlException.cs
- XmlArrayItemAttribute.cs
- XmlSubtreeReader.cs
- WebConfigurationFileMap.cs
- ObjectDataSourceDisposingEventArgs.cs
- UntypedNullExpression.cs
- SchemaCollectionPreprocessor.cs
- DescendantOverDescendantQuery.cs
- sortedlist.cs
- DataPointer.cs
- ControlPaint.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- FileSystemInfo.cs
- SafeNativeMethodsCLR.cs
- FormsAuthentication.cs
- DecoratedNameAttribute.cs
- BatchParser.cs
- TraceUtility.cs
- HostProtectionPermission.cs
- XappLauncher.cs
- InputLangChangeEvent.cs
- ViewManagerAttribute.cs
- XmlExceptionHelper.cs
- GridViewUpdateEventArgs.cs
- CopyAction.cs
- ManifestResourceInfo.cs
- IApplicationTrustManager.cs
- AnonymousIdentificationSection.cs
- MasterPageBuildProvider.cs
- RelatedCurrencyManager.cs
- EventSource.cs
- ContentControl.cs
- NativeConfigurationLoader.cs
- TreeNodeStyle.cs
- ComAdminWrapper.cs
- nulltextcontainer.cs
- TransactionManager.cs
- SafeThreadHandle.cs
- BevelBitmapEffect.cs
- NativeMethods.cs
- WsatAdminException.cs
- XsltSettings.cs
- PathGradientBrush.cs
- ListMarkerSourceInfo.cs
- Font.cs
- Predicate.cs
- IssuedTokensHeader.cs
- PackageStore.cs
- XmlArrayAttribute.cs
- EndpointAddressAugust2004.cs
- IntMinMaxAggregationOperator.cs
- SqlUserDefinedTypeAttribute.cs