Code:
/ FX-1434 / FX-1434 / 1.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
- StrongNameIdentityPermission.cs
- GridItemCollection.cs
- FileSystemWatcher.cs
- SoapAttributes.cs
- BitmapEffectGeneralTransform.cs
- PackageFilter.cs
- LambdaCompiler.cs
- HtmlEncodedRawTextWriter.cs
- HttpRequestWrapper.cs
- XsltArgumentList.cs
- WriteStateInfoBase.cs
- GridViewAutomationPeer.cs
- IListConverters.cs
- DomainConstraint.cs
- DelegateArgumentReference.cs
- SqlCharStream.cs
- MethodBuilder.cs
- WorkflowPrinting.cs
- SerializationFieldInfo.cs
- DrawingImage.cs
- initElementDictionary.cs
- BaseTemplateBuildProvider.cs
- SchemaImporter.cs
- CriticalFinalizerObject.cs
- SecurityBindingElement.cs
- EdmSchemaError.cs
- PcmConverter.cs
- StringExpressionSet.cs
- typedescriptorpermissionattribute.cs
- MulticastDelegate.cs
- NetCodeGroup.cs
- NonBatchDirectoryCompiler.cs
- ChtmlTextBoxAdapter.cs
- DataMisalignedException.cs
- LogicalChannel.cs
- CngKey.cs
- AmbientLight.cs
- ComponentRenameEvent.cs
- TextPattern.cs
- CacheSection.cs
- XLinq.cs
- CheckBoxRenderer.cs
- XmlTextReaderImplHelpers.cs
- ImageCodecInfo.cs
- SystemResourceHost.cs
- EmptyReadOnlyDictionaryInternal.cs
- ItemsChangedEventArgs.cs
- TreeViewTemplateSelector.cs
- AppDomainUnloadedException.cs
- HandleExceptionArgs.cs
- ProcessHostMapPath.cs
- securitycriticaldataClass.cs
- VolatileResourceManager.cs
- HyperLinkField.cs
- JpegBitmapEncoder.cs
- OdbcConnectionPoolProviderInfo.cs
- ConnectionPoolManager.cs
- controlskin.cs
- TextReturnReader.cs
- SQLBoolean.cs
- COAUTHINFO.cs
- BulletChrome.cs
- ContentPresenter.cs
- Int64.cs
- GlobalItem.cs
- PermissionListSet.cs
- AssociativeAggregationOperator.cs
- LabelExpression.cs
- RadioButtonAutomationPeer.cs
- DataGridViewSelectedCellCollection.cs
- AuthenticatedStream.cs
- QilStrConcat.cs
- DictionaryTraceRecord.cs
- DllNotFoundException.cs
- OleDbCommand.cs
- SynchronizationLockException.cs
- ManagementObjectCollection.cs
- ResXBuildProvider.cs
- EventMap.cs
- MenuCommandService.cs
- IndexedString.cs
- _ConnectStream.cs
- XmlFormatReaderGenerator.cs
- RoleManagerEventArgs.cs
- XhtmlStyleClass.cs
- DBProviderConfigurationHandler.cs
- Persist.cs
- SqlEnums.cs
- Model3D.cs
- SystemColors.cs
- DrawingContextWalker.cs
- DoWhileDesigner.xaml.cs
- SqlRecordBuffer.cs
- SocketElement.cs
- ValueExpressions.cs
- PassportIdentity.cs
- SubtreeProcessor.cs
- WebPartAddingEventArgs.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- StrokeNodeData.cs