Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / MouseEvent.cs / 1305376 / 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
- PkcsMisc.cs
- TemplateInstanceAttribute.cs
- JavaScriptObjectDeserializer.cs
- JsonGlobals.cs
- AvTrace.cs
- GenericEnumConverter.cs
- StreamWriter.cs
- Point3DCollectionValueSerializer.cs
- QueryConverter.cs
- Nodes.cs
- DataSourceXmlSerializer.cs
- DataBindingExpressionBuilder.cs
- storagemappingitemcollection.viewdictionary.cs
- RemotingException.cs
- ProfileBuildProvider.cs
- ContainerActivationHelper.cs
- FixedDSBuilder.cs
- _RequestCacheProtocol.cs
- EntityUtil.cs
- RegionData.cs
- FieldNameLookup.cs
- WinEventWrap.cs
- SettingsPropertyValue.cs
- AsymmetricSignatureFormatter.cs
- WmfPlaceableFileHeader.cs
- ToolStripLocationCancelEventArgs.cs
- ElementAction.cs
- Visual3D.cs
- MainMenu.cs
- TraceUtility.cs
- WebRequestModulesSection.cs
- ThrowHelper.cs
- DefaultExpressionVisitor.cs
- SimpleApplicationHost.cs
- SchemaManager.cs
- GridViewRow.cs
- PrimitiveCodeDomSerializer.cs
- MultilineStringConverter.cs
- HighlightVisual.cs
- NonVisualControlAttribute.cs
- HtmlElementEventArgs.cs
- WebPartsPersonalizationAuthorization.cs
- NestedContainer.cs
- ActivationServices.cs
- TemplateBaseAction.cs
- XmlAttributeCache.cs
- XPathNavigatorReader.cs
- ObjectMemberMapping.cs
- Camera.cs
- StateFinalizationDesigner.cs
- PanelStyle.cs
- RandomNumberGenerator.cs
- TranslateTransform.cs
- BuildManagerHost.cs
- MaskedTextProvider.cs
- XmlAnyElementAttributes.cs
- CollectionConverter.cs
- PropertyPathConverter.cs
- mongolianshape.cs
- _RequestCacheProtocol.cs
- SettingsProperty.cs
- LoggedException.cs
- MetadataItem.cs
- DataGridViewRowsRemovedEventArgs.cs
- NonClientArea.cs
- DataColumnCollection.cs
- EntryIndex.cs
- ProvidersHelper.cs
- BitmapEffectRenderDataResource.cs
- EndpointAddressProcessor.cs
- RSAPKCS1SignatureFormatter.cs
- ObjRef.cs
- InstanceKeyView.cs
- NamespaceEmitter.cs
- NativeRecognizer.cs
- RegexWorker.cs
- NativeMethods.cs
- Translator.cs
- DataView.cs
- NetworkInformationPermission.cs
- QueryInterceptorAttribute.cs
- DynamicObject.cs
- CqlErrorHelper.cs
- PasswordBox.cs
- LocationReferenceValue.cs
- PreviewPageInfo.cs
- StandardMenuStripVerb.cs
- PermissionSet.cs
- DataTransferEventArgs.cs
- SafeHandles.cs
- SqlIdentifier.cs
- DataTableReader.cs
- SoundPlayerAction.cs
- RestHandlerFactory.cs
- WebDisplayNameAttribute.cs
- DecimalStorage.cs
- DesignTimeParseData.cs
- BitmapEffectrendercontext.cs
- WorkflowLayouts.cs
- AutoResizedEvent.cs