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
- CodeObject.cs
- HighContrastHelper.cs
- TypeSemantics.cs
- XmlUtil.cs
- RuntimeHandles.cs
- PropertyChangingEventArgs.cs
- TextEndOfLine.cs
- DisplayMemberTemplateSelector.cs
- DBCSCodePageEncoding.cs
- CacheEntry.cs
- UserControlParser.cs
- NullRuntimeConfig.cs
- DbParameterCollection.cs
- RouteValueExpressionBuilder.cs
- FrameDimension.cs
- ContainerSelectorGlyph.cs
- FilterElement.cs
- DataGridTextBoxColumn.cs
- TypeConverterAttribute.cs
- GenericFlowSwitchHelper.cs
- HijriCalendar.cs
- LayoutEditorPart.cs
- SqlClientWrapperSmiStream.cs
- CompoundFileStreamReference.cs
- Properties.cs
- FilterableAttribute.cs
- ContextMenuStrip.cs
- WmlImageAdapter.cs
- AssociationType.cs
- OutputWindow.cs
- GlyphRunDrawing.cs
- MergePropertyDescriptor.cs
- FolderNameEditor.cs
- unitconverter.cs
- UnmanagedHandle.cs
- GAC.cs
- XPathArrayIterator.cs
- DataGridViewDataConnection.cs
- BatchStream.cs
- UnauthorizedAccessException.cs
- PackageStore.cs
- DataKey.cs
- Function.cs
- XmlEnumAttribute.cs
- ZipIOCentralDirectoryBlock.cs
- DesignerActionListCollection.cs
- ResourceDescriptionAttribute.cs
- RootAction.cs
- Storyboard.cs
- ParameterModifier.cs
- DataSvcMapFile.cs
- CompoundFileReference.cs
- MsmqIntegrationChannelListener.cs
- WindowsImpersonationContext.cs
- RSAPKCS1SignatureDeformatter.cs
- HttpCapabilitiesBase.cs
- DataColumnPropertyDescriptor.cs
- ISAPIApplicationHost.cs
- DesignSurface.cs
- TextBox.cs
- XmlSerializerVersionAttribute.cs
- BulletChrome.cs
- Button.cs
- StylusDownEventArgs.cs
- TextBoxRenderer.cs
- SourceLineInfo.cs
- ObjectAnimationBase.cs
- AnimationStorage.cs
- Helpers.cs
- StoryFragments.cs
- NumberFormatter.cs
- ColorConverter.cs
- CollectionViewGroupInternal.cs
- HtmlInputSubmit.cs
- ImageMapEventArgs.cs
- VisualStyleInformation.cs
- BuildProvider.cs
- WsdlInspector.cs
- DataGridViewLayoutData.cs
- HttpModuleAction.cs
- EnumerableRowCollectionExtensions.cs
- DataGridCellEditEndingEventArgs.cs
- CapabilitiesState.cs
- EncoderExceptionFallback.cs
- EntityParameter.cs
- ErrorFormatterPage.cs
- CodeExpressionStatement.cs
- ExtensibleClassFactory.cs
- RenderTargetBitmap.cs
- SQLUtility.cs
- HttpPostedFile.cs
- MenuEventArgs.cs
- NetNamedPipeBindingCollectionElement.cs
- AsymmetricKeyExchangeDeformatter.cs
- _TimerThread.cs
- PerspectiveCamera.cs
- EnterpriseServicesHelper.cs
- MaterialGroup.cs
- MetadataProperty.cs
- TableLayoutColumnStyleCollection.cs