Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FloaterBaseParaClient.cs
- XmlLinkedNode.cs
- IPHostEntry.cs
- ByteRangeDownloader.cs
- XmlEncoding.cs
- CodeDelegateCreateExpression.cs
- BindUriHelper.cs
- HashMembershipCondition.cs
- WebPartConnectVerb.cs
- DetailsViewDeleteEventArgs.cs
- ListItemCollection.cs
- ConnectionStringSettings.cs
- EncryptedPackage.cs
- InstancePersistenceEvent.cs
- FastEncoderWindow.cs
- GridViewDeletedEventArgs.cs
- TaskFormBase.cs
- _LocalDataStoreMgr.cs
- DataGridViewAutoSizeModeEventArgs.cs
- DesignTimeSiteMapProvider.cs
- RadialGradientBrush.cs
- VoiceChangeEventArgs.cs
- MetafileHeaderWmf.cs
- MessageSecurityOverHttpElement.cs
- DbgUtil.cs
- AtomMaterializerLog.cs
- RelationshipConverter.cs
- DataTable.cs
- GridViewDeleteEventArgs.cs
- Win32Native.cs
- LocalizableResourceBuilder.cs
- SafeThreadHandle.cs
- Environment.cs
- CodeAttributeDeclaration.cs
- XmlSequenceWriter.cs
- ResourcesGenerator.cs
- SplashScreenNativeMethods.cs
- WSFederationHttpSecurityElement.cs
- CommonGetThemePartSize.cs
- LinkConverter.cs
- KeyConverter.cs
- MailMessageEventArgs.cs
- FaultDesigner.cs
- Configuration.cs
- WebPartConnectionsConnectVerb.cs
- WorkflowRuntimeServiceElementCollection.cs
- NamespaceQuery.cs
- UnauthorizedAccessException.cs
- GlyphCache.cs
- PersonalizationDictionary.cs
- FontInfo.cs
- rsa.cs
- ServiceModelActivationSectionGroup.cs
- StringResourceManager.cs
- ChannelManager.cs
- Error.cs
- ConfigurationElement.cs
- DiscriminatorMap.cs
- MultitargetingHelpers.cs
- DescriptionAttribute.cs
- TextRunProperties.cs
- XamlFxTrace.cs
- SqlNamer.cs
- EventWaitHandle.cs
- DataGridPagerStyle.cs
- Command.cs
- ExtensionElement.cs
- ClientRolePrincipal.cs
- OutputWindow.cs
- SQLDateTimeStorage.cs
- NetStream.cs
- PartialCachingControl.cs
- PersonalizationDictionary.cs
- Misc.cs
- CodeNamespaceImportCollection.cs
- BaseTemplateBuildProvider.cs
- DataSetMappper.cs
- ImportStoreException.cs
- TimeSpanOrInfiniteConverter.cs
- Buffer.cs
- Adorner.cs
- LocalValueEnumerator.cs
- _SingleItemRequestCache.cs
- NGCSerializer.cs
- TypeDependencyAttribute.cs
- RuntimeHandles.cs
- Assembly.cs
- CodeLinePragma.cs
- SQLBoolean.cs
- MetadataArtifactLoaderCompositeFile.cs
- ToolboxComponentsCreatedEventArgs.cs
- PrinterResolution.cs
- SqlInternalConnectionSmi.cs
- QilXmlReader.cs
- GatewayDefinition.cs
- LayoutUtils.cs
- DependencyObjectCodeDomSerializer.cs
- TextFormatterImp.cs
- RSAPKCS1KeyExchangeFormatter.cs
- EntityConnectionStringBuilder.cs