Code:
/ FX-1434 / FX-1434 / 1.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
- __FastResourceComparer.cs
- DoubleAnimationUsingKeyFrames.cs
- TempFiles.cs
- DSASignatureFormatter.cs
- FormViewPagerRow.cs
- HtmlLinkAdapter.cs
- AttachmentService.cs
- DragAssistanceManager.cs
- TypeUtils.cs
- EventHandlerList.cs
- DefaultValueAttribute.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- XmlIgnoreAttribute.cs
- BaseTemplatedMobileComponentEditor.cs
- Rotation3D.cs
- BaseDataBoundControl.cs
- HtmlDocument.cs
- WindowsProgressbar.cs
- DeviceContexts.cs
- RuleSettings.cs
- PartialCachingAttribute.cs
- JoinSymbol.cs
- XmlIterators.cs
- ProfileParameter.cs
- UIAgentAsyncBeginRequest.cs
- TreeNodeCollection.cs
- PipelineComponent.cs
- TraceSection.cs
- SplayTreeNode.cs
- VersionedStream.cs
- querybuilder.cs
- PageEventArgs.cs
- XPathPatternParser.cs
- XmlSchemaGroup.cs
- SendSecurityHeaderElement.cs
- ConfigurationStrings.cs
- AuthenticateEventArgs.cs
- DBPropSet.cs
- CopyOfAction.cs
- HScrollBar.cs
- unitconverter.cs
- SyndicationSerializer.cs
- EntityModelBuildProvider.cs
- XPathExpr.cs
- PrintEvent.cs
- TraceLog.cs
- FloaterBaseParagraph.cs
- EntityKey.cs
- XPathConvert.cs
- MobileContainerDesigner.cs
- XhtmlTextWriter.cs
- LocatorBase.cs
- DataRelationCollection.cs
- FileDialogCustomPlace.cs
- ContentPropertyAttribute.cs
- UniformGrid.cs
- PageParser.cs
- PackWebRequestFactory.cs
- EmptyReadOnlyDictionaryInternal.cs
- DecimalFormatter.cs
- InstancePersistenceException.cs
- HWStack.cs
- ButtonField.cs
- DataGridViewCell.cs
- AnimatedTypeHelpers.cs
- IsolatedStorageFile.cs
- Empty.cs
- DataFormats.cs
- EventLogReader.cs
- SrgsToken.cs
- WebSysDefaultValueAttribute.cs
- SqlComparer.cs
- ParserHooks.cs
- XmlAttributes.cs
- ContainerVisual.cs
- DataSvcMapFile.cs
- SystemInfo.cs
- SelectionRangeConverter.cs
- ColorAnimation.cs
- Sentence.cs
- RoutedUICommand.cs
- MethodAccessException.cs
- AccessibilityHelperForXpWin2k3.cs
- BuildResultCache.cs
- WindowsRegion.cs
- ToolStripCodeDomSerializer.cs
- LingerOption.cs
- DocumentReferenceCollection.cs
- EntityDataSourceQueryBuilder.cs
- Vector3dCollection.cs
- MeshGeometry3D.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- FontFamilyValueSerializer.cs
- WaveHeader.cs
- Attribute.cs
- NotifyIcon.cs
- ConcurrentQueue.cs
- SqlDataSourceCommandEventArgs.cs
- BrowserCapabilitiesCompiler.cs
- SelectingProviderEventArgs.cs