Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 2 / DataGridViewToolTip.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Security; using System.Diagnostics; using System.Drawing; using System.Runtime.InteropServices; namespace System.Windows.Forms { public partial class DataGridView { private class DataGridViewToolTip { DataGridView dataGridView = null; ToolTip toolTip = null; private bool toolTipActivated = false; public DataGridViewToolTip(DataGridView dataGridView) { this.dataGridView = dataGridView; } public bool Activated { get { return this.toolTipActivated; } } public ToolTip ToolTip { get { return this.toolTip; } } public void Activate(bool activate) { if (this.dataGridView.DesignMode) { return; } // Create the tool tip handle on demand. if (activate && this.toolTip == null) { this.toolTip = new ToolTip(); this.toolTip.ShowAlways = true; this.toolTip.InitialDelay = 0; this.toolTip.UseFading = false; this.toolTip.UseAnimation = false; this.toolTip.AutoPopDelay = 0; } if (this.dataGridView.IsRestricted) { IntSecurity.AllWindows.Assert(); } try { if (activate) { this.toolTip.Active = true; this.toolTip.Show(this.dataGridView.ToolTipPrivate, this.dataGridView); } else if (this.toolTip != null) { this.toolTip.Hide(this.dataGridView); this.toolTip.Active = false; } } finally { if (this.dataGridView.IsRestricted) { CodeAccessPermission.RevertAssert(); } } this.toolTipActivated = activate; } public void Dispose() { if (this.toolTip != null) { this.toolTip.Dispose(); this.toolTip = null; } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Vector3DCollectionConverter.cs
- WpfSharedBamlSchemaContext.cs
- HwndHost.cs
- BuildDependencySet.cs
- TraceListeners.cs
- IDReferencePropertyAttribute.cs
- ListViewSelectEventArgs.cs
- AuthenticationException.cs
- SHA256.cs
- TreeNodeStyleCollection.cs
- PersonalizationStateQuery.cs
- SchemaDeclBase.cs
- NavigationPropertyEmitter.cs
- TableProvider.cs
- QilStrConcatenator.cs
- HostedHttpRequestAsyncResult.cs
- Point.cs
- ProcessModelSection.cs
- MouseButtonEventArgs.cs
- SettingsBase.cs
- ZeroOpNode.cs
- NumericUpDownAccelerationCollection.cs
- ToolStripKeyboardHandlingService.cs
- isolationinterop.cs
- CaseInsensitiveHashCodeProvider.cs
- HighlightVisual.cs
- HttpFileCollection.cs
- TemplateEditingVerb.cs
- TextChange.cs
- ListViewItemMouseHoverEvent.cs
- ArrayConverter.cs
- CodeDirectionExpression.cs
- ShutDownListener.cs
- _ConnectOverlappedAsyncResult.cs
- SqlNodeAnnotations.cs
- CodeAccessSecurityEngine.cs
- PropertySegmentSerializationProvider.cs
- FlagsAttribute.cs
- TimersDescriptionAttribute.cs
- SubpageParagraph.cs
- ISAPIRuntime.cs
- Parallel.cs
- RootAction.cs
- InheritablePropertyChangeInfo.cs
- FieldToken.cs
- ButtonChrome.cs
- TrackPoint.cs
- OrderByQueryOptionExpression.cs
- SystemIcmpV4Statistics.cs
- DoubleAnimationBase.cs
- ControllableStoryboardAction.cs
- LateBoundBitmapDecoder.cs
- LogicalTreeHelper.cs
- RangeValuePatternIdentifiers.cs
- ShapingEngine.cs
- WithStatement.cs
- UInt16Storage.cs
- DataSourceControlBuilder.cs
- SmtpAuthenticationManager.cs
- x509utils.cs
- X509CertificateValidator.cs
- VisualTreeHelper.cs
- RowVisual.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- _IPv4Address.cs
- RegisteredExpandoAttribute.cs
- DataGridViewImageCell.cs
- StateMachineHelpers.cs
- DefaultTypeArgumentAttribute.cs
- SelectionChangedEventArgs.cs
- SQLString.cs
- GenericTextProperties.cs
- ThicknessKeyFrameCollection.cs
- GeometryHitTestResult.cs
- DateTimeFormatInfo.cs
- WindowsFormsHelpers.cs
- DuplicateWaitObjectException.cs
- ServiceRouteHandler.cs
- ZoneLinkButton.cs
- HttpRequest.cs
- MethodAccessException.cs
- TransformedBitmap.cs
- EncryptedData.cs
- BasicHttpBindingElement.cs
- BaseComponentEditor.cs
- SocketException.cs
- PermissionSet.cs
- FreeFormDragDropManager.cs
- DataGridViewCellValidatingEventArgs.cs
- FormClosingEvent.cs
- ChtmlMobileTextWriter.cs
- UxThemeWrapper.cs
- CqlIdentifiers.cs
- BaseParser.cs
- ActiveXSite.cs
- FrugalMap.cs
- HttpCachePolicy.cs
- ToolboxItem.cs
- WpfWebRequestHelper.cs
- AttachInfo.cs