Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 1 / 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. // //----------------------------------------------------------------------------- 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
- RuntimeResourceSet.cs
- ToolStripItemBehavior.cs
- SimpleRecyclingCache.cs
- DefaultHttpHandler.cs
- ControlUtil.cs
- Brushes.cs
- CompareValidator.cs
- StackOverflowException.cs
- ObjectAnimationUsingKeyFrames.cs
- SpeakCompletedEventArgs.cs
- Condition.cs
- PointAnimationUsingKeyFrames.cs
- GetCardDetailsRequest.cs
- MetadataPropertyAttribute.cs
- KeyedByTypeCollection.cs
- RecordManager.cs
- GroupBoxRenderer.cs
- BinaryParser.cs
- CompareInfo.cs
- DelegateSerializationHolder.cs
- WaitForChangedResult.cs
- PriorityRange.cs
- SortedDictionary.cs
- MediaEntryAttribute.cs
- ArrayExtension.cs
- TextBoxBase.cs
- Repeater.cs
- documentsequencetextview.cs
- GridViewRowCollection.cs
- TableCellCollection.cs
- RelationshipEndMember.cs
- XsdDateTime.cs
- UpdateException.cs
- GridItemCollection.cs
- GeneratedContractType.cs
- WebPartDisplayMode.cs
- ProbeMatches11.cs
- ExpressionVisitorHelpers.cs
- LayoutEvent.cs
- HealthMonitoringSection.cs
- GeneratedContractType.cs
- IntPtr.cs
- RequiredAttributeAttribute.cs
- MissingManifestResourceException.cs
- WebMethodAttribute.cs
- DifferencingCollection.cs
- ProxyGenerator.cs
- ScrollBarRenderer.cs
- RtType.cs
- Rfc2898DeriveBytes.cs
- TextTreeDeleteContentUndoUnit.cs
- Baml2006SchemaContext.cs
- KnowledgeBase.cs
- LogicalChannel.cs
- PeerInvitationResponse.cs
- Currency.cs
- ServiceTimeoutsElement.cs
- Vector3DConverter.cs
- ResourceDescriptionAttribute.cs
- ConfigurationLocationCollection.cs
- PersonalizableAttribute.cs
- SoapObjectWriter.cs
- DateTimeConverter2.cs
- Int32CollectionConverter.cs
- Literal.cs
- EnumerableRowCollectionExtensions.cs
- XPathDocumentNavigator.cs
- RowType.cs
- XsltArgumentList.cs
- WindowsMenu.cs
- ActiveXHost.cs
- NamedElement.cs
- CategoryValueConverter.cs
- WorkflowDesignerMessageFilter.cs
- ElapsedEventArgs.cs
- ResXResourceSet.cs
- SQLBoolean.cs
- Imaging.cs
- StringArrayConverter.cs
- Triangle.cs
- DataSourceConverter.cs
- ImageConverter.cs
- Timer.cs
- XhtmlBasicControlAdapter.cs
- SessionStateSection.cs
- ChildChangedEventArgs.cs
- TypeGeneratedEventArgs.cs
- TraceLevelStore.cs
- CatalogZoneBase.cs
- ResolvedKeyFrameEntry.cs
- MetaColumn.cs
- Thread.cs
- XmlSchemaDocumentation.cs
- Size.cs
- MaskedTextBoxTextEditor.cs
- PaintValueEventArgs.cs
- DescriptionAttribute.cs
- EndOfStreamException.cs
- TextParentUndoUnit.cs
- RenderOptions.cs