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
- FileSecurity.cs
- ContextBase.cs
- ILGenerator.cs
- InkPresenterAutomationPeer.cs
- DirectoryInfo.cs
- TCEAdapterGenerator.cs
- ElementsClipboardData.cs
- ComponentChangedEvent.cs
- COM2IPerPropertyBrowsingHandler.cs
- CellLabel.cs
- Metafile.cs
- StreamWriter.cs
- LinqDataSourceInsertEventArgs.cs
- SelectionProcessor.cs
- RelationshipNavigation.cs
- AnnotationComponentManager.cs
- SQLDateTime.cs
- RelOps.cs
- PiiTraceSource.cs
- SQLInt16.cs
- SiteMapSection.cs
- PublisherMembershipCondition.cs
- NamedObject.cs
- SelectionUIHandler.cs
- TypeDependencyAttribute.cs
- ThicknessAnimation.cs
- ConstraintCollection.cs
- NavigationFailedEventArgs.cs
- XmlObjectSerializerReadContext.cs
- LicFileLicenseProvider.cs
- BridgeDataReader.cs
- DiscoveryReferences.cs
- WhitespaceRuleReader.cs
- StreamGeometry.cs
- TextChange.cs
- UnauthorizedWebPart.cs
- HtmlInputPassword.cs
- cache.cs
- DataGridItemEventArgs.cs
- DefaultObjectMappingItemCollection.cs
- TemplateBuilder.cs
- PeerNearMe.cs
- PropertyPath.cs
- SHA256Managed.cs
- SmtpReplyReaderFactory.cs
- Literal.cs
- TemplateControl.cs
- ParserContext.cs
- SimpleWorkerRequest.cs
- TreeNodeClickEventArgs.cs
- SafeCryptoHandles.cs
- VarInfo.cs
- XmlValidatingReaderImpl.cs
- NonDualMessageSecurityOverHttpElement.cs
- SectionVisual.cs
- EntityUtil.cs
- EntityDataSourceChangingEventArgs.cs
- FunctionDetailsReader.cs
- ZoomPercentageConverter.cs
- PrePostDescendentsWalker.cs
- RangeValidator.cs
- SqlMethods.cs
- PEFileEvidenceFactory.cs
- ResumeStoryboard.cs
- OleDbStruct.cs
- SectionUpdates.cs
- ValidationHelper.cs
- _NtlmClient.cs
- CommandBindingCollection.cs
- TraceInternal.cs
- ComponentDispatcherThread.cs
- LinqExpressionNormalizer.cs
- ServiceDesigner.cs
- SingleConverter.cs
- ErrorInfoXmlDocument.cs
- StrongName.cs
- WindowsToolbar.cs
- RSAProtectedConfigurationProvider.cs
- RadioButton.cs
- Int64KeyFrameCollection.cs
- ControllableStoryboardAction.cs
- OrderedDictionaryStateHelper.cs
- TextRangeAdaptor.cs
- MemberAssignmentAnalysis.cs
- OdbcStatementHandle.cs
- ZipIOExtraField.cs
- SortableBindingList.cs
- LinkGrep.cs
- RangeEnumerable.cs
- SQLRoleProvider.cs
- BaseTemplateCodeDomTreeGenerator.cs
- EventMappingSettingsCollection.cs
- XmlSchemaRedefine.cs
- StylusEventArgs.cs
- AssemblyAttributesGoHere.cs
- RuleAction.cs
- EmptyCollection.cs
- TextAnchor.cs
- BitmapCache.cs
- Vector3DAnimation.cs