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
- ComboBoxItem.cs
- PropertyRecord.cs
- FixedDocumentPaginator.cs
- elementinformation.cs
- SharedPerformanceCounter.cs
- ContextMenuService.cs
- RSACryptoServiceProvider.cs
- SQLMembershipProvider.cs
- ScriptMethodAttribute.cs
- CodeAssignStatement.cs
- DocumentPaginator.cs
- OleTxTransaction.cs
- RelationshipConverter.cs
- GuidelineSet.cs
- IList.cs
- LoginView.cs
- ComponentSerializationService.cs
- GrammarBuilderRuleRef.cs
- SoapMessage.cs
- XmlAttributeOverrides.cs
- ConnectionPointCookie.cs
- Triangle.cs
- Int32RectValueSerializer.cs
- CodeEventReferenceExpression.cs
- GrowingArray.cs
- AncestorChangedEventArgs.cs
- DeferredTextReference.cs
- DbConnectionPool.cs
- FilterException.cs
- XmlSchemaInfo.cs
- ResourceContainer.cs
- WorkflowTimerService.cs
- DrawingServices.cs
- TemplateControlCodeDomTreeGenerator.cs
- EventBindingService.cs
- WindowsSecurityToken.cs
- ObjectDataProvider.cs
- ToolBarDesigner.cs
- _NestedSingleAsyncResult.cs
- RC2.cs
- XmlDeclaration.cs
- SettingsPropertyCollection.cs
- SamlAuthenticationStatement.cs
- WebBrowsableAttribute.cs
- SqlBulkCopyColumnMappingCollection.cs
- XmlSchemaSimpleTypeRestriction.cs
- CacheSection.cs
- XmlDomTextWriter.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- OrderByBuilder.cs
- OpenFileDialog.cs
- XamlSerializationHelper.cs
- ConnectionStringSettings.cs
- CompiledXpathExpr.cs
- MenuItemBindingCollection.cs
- KeyInstance.cs
- PagesSection.cs
- SystemMulticastIPAddressInformation.cs
- DetailsViewCommandEventArgs.cs
- Zone.cs
- TripleDESCryptoServiceProvider.cs
- RenderingEventArgs.cs
- IsolatedStorageException.cs
- DockEditor.cs
- OdbcReferenceCollection.cs
- HotSpotCollectionEditor.cs
- CodeTypeParameterCollection.cs
- ClientSponsor.cs
- ApplicationDirectoryMembershipCondition.cs
- MsmqChannelFactory.cs
- CaseCqlBlock.cs
- SelectionItemProviderWrapper.cs
- BmpBitmapEncoder.cs
- FormsAuthentication.cs
- KeyManager.cs
- GridViewSelectEventArgs.cs
- CachingHintValidation.cs
- InheritanceContextChangedEventManager.cs
- TaskFileService.cs
- ProfilePropertyMetadata.cs
- ImageAutomationPeer.cs
- TokenBasedSet.cs
- RegexStringValidatorAttribute.cs
- Grid.cs
- XmlTypeMapping.cs
- SqlTransaction.cs
- RenamedEventArgs.cs
- DropSource.cs
- TraceFilter.cs
- thaishape.cs
- PropertyFilterAttribute.cs
- BamlLocalizableResource.cs
- CounterCreationData.cs
- Events.cs
- TransactionException.cs
- OracleConnectionString.cs
- Typeface.cs
- ProfessionalColors.cs
- MarshalDirectiveException.cs
- SelectorItemAutomationPeer.cs