Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. //------------------------------------------------------------------------------ ///// Gets the location of the mouse during MouseEvent. /// ///// 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./// Gets the location of the mouse during MouseEvent. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SerializationSectionGroup.cs
- ApplicationFileCodeDomTreeGenerator.cs
- BevelBitmapEffect.cs
- CompositeDataBoundControl.cs
- _ProxyChain.cs
- SEHException.cs
- StringCollection.cs
- ServiceProviders.cs
- CommandValueSerializer.cs
- BoolExpr.cs
- MailWebEventProvider.cs
- EntityDataSourceViewSchema.cs
- WindowsEditBox.cs
- HybridDictionary.cs
- WsatServiceCertificate.cs
- EntityConnectionStringBuilder.cs
- ErrorHandler.cs
- UnsafeNativeMethods.cs
- EventDescriptor.cs
- AssemblyBuilder.cs
- TargetParameterCountException.cs
- FilterException.cs
- ObjectCloneHelper.cs
- ObjectListField.cs
- HyperLink.cs
- MultiplexingFormatMapping.cs
- VoiceObjectToken.cs
- TextParagraph.cs
- ContextBase.cs
- DataServiceProviderWrapper.cs
- PenLineJoinValidation.cs
- TextParagraphView.cs
- ErrorEventArgs.cs
- CopyAction.cs
- Directory.cs
- UTF8Encoding.cs
- XmlHierarchicalDataSourceView.cs
- ErrorFormatterPage.cs
- ManagementObject.cs
- IdentityNotMappedException.cs
- Version.cs
- StringWriter.cs
- DataGridState.cs
- SafeRightsManagementPubHandle.cs
- Exception.cs
- XPathAxisIterator.cs
- CDSCollectionETWBCLProvider.cs
- ComponentRenameEvent.cs
- VariableQuery.cs
- UnauthorizedWebPart.cs
- assertwrapper.cs
- DrawingBrush.cs
- RootBrowserWindowProxy.cs
- CodeSubDirectoriesCollection.cs
- DesignTimeData.cs
- ipaddressinformationcollection.cs
- SQLRoleProvider.cs
- FixedSOMSemanticBox.cs
- UrlPath.cs
- SerializationException.cs
- WaitHandle.cs
- GridViewSortEventArgs.cs
- GeometryHitTestParameters.cs
- CharConverter.cs
- NetworkStream.cs
- WebException.cs
- Adorner.cs
- BamlVersionHeader.cs
- SafeArrayRankMismatchException.cs
- SemaphoreFullException.cs
- SafeJobHandle.cs
- PasswordPropertyTextAttribute.cs
- WebPartManagerInternals.cs
- XmlEntityReference.cs
- EditorPart.cs
- DataStreams.cs
- Duration.cs
- TextMetrics.cs
- WebPartConnectionsCancelVerb.cs
- ServiceInfo.cs
- ButtonFlatAdapter.cs
- Span.cs
- TextContainerHelper.cs
- ComponentDispatcherThread.cs
- Module.cs
- FieldReference.cs
- InputBuffer.cs
- DocumentGridPage.cs
- ExtensionFile.cs
- MDIClient.cs
- HttpResponseInternalWrapper.cs
- EventHandlerList.cs
- FrameworkContentElementAutomationPeer.cs
- FixedSOMTable.cs
- BooleanFacetDescriptionElement.cs
- NativeObjectSecurity.cs
- FileFormatException.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- CheckedListBox.cs
- EntityContainerAssociationSetEnd.cs