Code:
/ 4.0 / 4.0 / untmp / 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. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XDRSchema.cs
- XmlSerializerVersionAttribute.cs
- Span.cs
- IndexerNameAttribute.cs
- SQLInt16Storage.cs
- CompilerWrapper.cs
- FileDataSourceCache.cs
- ClientUriBehavior.cs
- ContextDataSourceContextData.cs
- WindowsListViewGroupHelper.cs
- XmlSignificantWhitespace.cs
- URLAttribute.cs
- Button.cs
- ConnectionConsumerAttribute.cs
- ToolStripOverflowButton.cs
- ServiceMemoryGates.cs
- EncoderNLS.cs
- WsdlServiceChannelBuilder.cs
- DataGridViewCellStateChangedEventArgs.cs
- DependencyObjectPropertyDescriptor.cs
- ProgressBarAutomationPeer.cs
- InkCanvasSelectionAdorner.cs
- ValidatingCollection.cs
- FontClient.cs
- QilStrConcatenator.cs
- ModelItemCollection.cs
- MessageEventSubscriptionService.cs
- SelectionRangeConverter.cs
- SettingsBase.cs
- OutputCacheProfileCollection.cs
- StorageEntityTypeMapping.cs
- TextRenderer.cs
- CheckBox.cs
- RegularExpressionValidator.cs
- BitmapPalettes.cs
- PermissionSetEnumerator.cs
- FilterUserControlBase.cs
- CommonDialog.cs
- SolidColorBrush.cs
- EntityViewContainer.cs
- EntityConnectionStringBuilderItem.cs
- QueryTask.cs
- PropertyPathWorker.cs
- FlowLayoutSettings.cs
- UnsettableComboBox.cs
- ColorTransform.cs
- HostingPreferredMapPath.cs
- ImageMap.cs
- ButtonChrome.cs
- CallContext.cs
- GifBitmapDecoder.cs
- OracleInternalConnection.cs
- ConsumerConnectionPoint.cs
- XmlImplementation.cs
- EntryIndex.cs
- TrackingStringDictionary.cs
- LinqExpressionNormalizer.cs
- DuplexClientBase.cs
- EntityAdapter.cs
- ActivityPreviewDesigner.cs
- ContractSearchPattern.cs
- DataGridViewRowStateChangedEventArgs.cs
- SerialErrors.cs
- Select.cs
- XPathDocumentBuilder.cs
- CornerRadius.cs
- PowerModeChangedEventArgs.cs
- RegexCode.cs
- MetricEntry.cs
- FormsIdentity.cs
- BitmapEffectInput.cs
- TransactionCache.cs
- QuadraticEase.cs
- _SecureChannel.cs
- Geometry.cs
- MimeWriter.cs
- HtmlDocument.cs
- Thickness.cs
- WebFormsRootDesigner.cs
- IntAverageAggregationOperator.cs
- BinaryExpressionHelper.cs
- MatchAttribute.cs
- Binding.cs
- GridViewUpdatedEventArgs.cs
- ToolStripSettings.cs
- IPEndPoint.cs
- HttpApplication.cs
- PropertyValidationContext.cs
- ArrayMergeHelper.cs
- DocumentViewerConstants.cs
- ItemChangedEventArgs.cs
- ExtendedProtectionPolicyTypeConverter.cs
- OleDbDataAdapter.cs
- formatter.cs
- SectionXmlInfo.cs
- WeakReferenceEnumerator.cs
- PerspectiveCamera.cs
- httpstaticobjectscollection.cs
- TextAutomationPeer.cs
- Dictionary.cs