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
- HtmlImageAdapter.cs
- BlurBitmapEffect.cs
- DynamicRendererThreadManager.cs
- PlanCompiler.cs
- TextCollapsingProperties.cs
- MailMessageEventArgs.cs
- SystemColorTracker.cs
- Parallel.cs
- XpsFont.cs
- DefaultValueAttribute.cs
- RectAnimation.cs
- BuildDependencySet.cs
- ModulesEntry.cs
- FtpWebResponse.cs
- RouteParser.cs
- Table.cs
- PrimaryKeyTypeConverter.cs
- FormViewRow.cs
- HijriCalendar.cs
- JsonFormatMapping.cs
- AttachInfo.cs
- CustomExpressionEventArgs.cs
- OptimalBreakSession.cs
- AttachedProperty.cs
- AbandonedMutexException.cs
- ToolStripRenderEventArgs.cs
- DescendantOverDescendantQuery.cs
- ResXBuildProvider.cs
- ResourceReader.cs
- DeviceFiltersSection.cs
- PeerTransportListenAddressConverter.cs
- Parser.cs
- SignatureDescription.cs
- UnknownWrapper.cs
- HierarchicalDataSourceControl.cs
- VersionConverter.cs
- shaperfactory.cs
- ValuePattern.cs
- DataBindEngine.cs
- EndEvent.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- ExtensionWindow.cs
- MexNamedPipeBindingElement.cs
- StrokeNodeOperations2.cs
- FromRequest.cs
- rsa.cs
- KnownBoxes.cs
- PtsHelper.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- Gdiplus.cs
- XamlPoint3DCollectionSerializer.cs
- AutomationProperties.cs
- PingOptions.cs
- AlternateView.cs
- Query.cs
- DataSourceViewSchemaConverter.cs
- WebBrowserContainer.cs
- XmlTextWriter.cs
- PKCS1MaskGenerationMethod.cs
- WebPart.cs
- TextServicesLoader.cs
- SqlGenericUtil.cs
- QueryParameter.cs
- ActivityValidationServices.cs
- DateTimeUtil.cs
- ListBindingConverter.cs
- SiteMapPath.cs
- XPathSelfQuery.cs
- MarkupExtensionParser.cs
- UndoManager.cs
- EventTrigger.cs
- HopperCache.cs
- NavigationCommands.cs
- PointConverter.cs
- InfoCardKeyedHashAlgorithm.cs
- QilGenerator.cs
- DataGridViewLinkColumn.cs
- HttpTransportSecurityElement.cs
- GetImportFileNameRequest.cs
- LeafCellTreeNode.cs
- DllNotFoundException.cs
- Bezier.cs
- DbParameterCollectionHelper.cs
- DecimalAnimationBase.cs
- _SslStream.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- LazyTextWriterCreator.cs
- SoapAttributes.cs
- RefreshEventArgs.cs
- DataRecordInternal.cs
- ZipIOCentralDirectoryBlock.cs
- Bold.cs
- MembershipUser.cs
- TextRenderer.cs
- FileNotFoundException.cs
- SourceSwitch.cs
- ThreadTrace.cs
- XmlTextAttribute.cs
- ContentPosition.cs
- BroadcastEventHelper.cs