Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- WindowsListViewGroup.cs
- TypefaceCollection.cs
- ContentFilePart.cs
- GridItem.cs
- ThreadAbortException.cs
- MediaElement.cs
- VisemeEventArgs.cs
- AnnotationService.cs
- StateManagedCollection.cs
- DataColumnCollection.cs
- StreamWriter.cs
- QueryCacheEntry.cs
- SignedPkcs7.cs
- DocumentGridContextMenu.cs
- XmlTextWriter.cs
- ObjectPersistData.cs
- SqlConnectionPoolGroupProviderInfo.cs
- LongPath.cs
- AdCreatedEventArgs.cs
- WinEventTracker.cs
- ProcessModuleDesigner.cs
- EditingCoordinator.cs
- Keyboard.cs
- PointAnimationUsingKeyFrames.cs
- AutomationPropertyInfo.cs
- RemotingAttributes.cs
- AdPostCacheSubstitution.cs
- RegionInfo.cs
- SqlDataSourceSelectingEventArgs.cs
- InternalConfigSettingsFactory.cs
- xsdvalidator.cs
- XmlSchemaAnyAttribute.cs
- WebPartZoneCollection.cs
- AdapterUtil.cs
- RowSpanVector.cs
- PointLight.cs
- ModuleConfigurationInfo.cs
- ZipIOExtraFieldZip64Element.cs
- MiniParameterInfo.cs
- PropertyState.cs
- SpeechRecognitionEngine.cs
- RangeValidator.cs
- XmlNotation.cs
- LayoutSettings.cs
- XomlCompilerResults.cs
- FlowSwitch.cs
- IndentedWriter.cs
- StylusOverProperty.cs
- ComboBoxItem.cs
- KeySplineConverter.cs
- PipeConnection.cs
- FilterElement.cs
- SystemPens.cs
- TreeNodeSelectionProcessor.cs
- MultiSelector.cs
- CultureInfoConverter.cs
- SqlBuilder.cs
- LicenseManager.cs
- TripleDESCryptoServiceProvider.cs
- SerializerWriterEventHandlers.cs
- BlurEffect.cs
- SqlConnectionHelper.cs
- ConnectionStringSettingsCollection.cs
- EnumConverter.cs
- FunctionMappingTranslator.cs
- DataGridViewHitTestInfo.cs
- Parameter.cs
- ListDictionaryInternal.cs
- PersonalizablePropertyEntry.cs
- MetabaseServerConfig.cs
- ReadOnlyNameValueCollection.cs
- PageAsyncTaskManager.cs
- HttpDebugHandler.cs
- HtmlDocument.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- DelimitedListTraceListener.cs
- TextCompositionEventArgs.cs
- InputProcessorProfilesLoader.cs
- ModelTreeEnumerator.cs
- SynchronizedInputHelper.cs
- OverrideMode.cs
- WindowsScrollBarBits.cs
- FieldDescriptor.cs
- ValueProviderWrapper.cs
- NameSpaceExtractor.cs
- RtType.cs
- CheckBox.cs
- OleDbEnumerator.cs
- SequenceDesigner.xaml.cs
- BaseAddressPrefixFilterElement.cs
- RSAOAEPKeyExchangeFormatter.cs
- securitycriticaldata.cs
- TypeGeneratedEventArgs.cs
- IntSecurity.cs
- ClientTarget.cs
- DuplicateWaitObjectException.cs
- LookupBindingPropertiesAttribute.cs
- Relationship.cs
- Configuration.cs
- Color.cs