Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 5 / 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
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- ControlType.cs
- RC2.cs
- Accessible.cs
- PeerToPeerException.cs
- Int32Converter.cs
- ContextActivityUtils.cs
- LeftCellWrapper.cs
- AnimatedTypeHelpers.cs
- WindowsSolidBrush.cs
- ImageSource.cs
- TableRowGroup.cs
- CustomAttribute.cs
- StringSorter.cs
- ControlPropertyNameConverter.cs
- X509CertificateInitiatorServiceCredential.cs
- SubMenuStyleCollection.cs
- PolicyImporterElementCollection.cs
- ComplexTypeEmitter.cs
- CodeTypeParameter.cs
- TextBoxLine.cs
- ConfigXmlReader.cs
- SmiContextFactory.cs
- SafeEventLogWriteHandle.cs
- GlyphingCache.cs
- PageContentCollection.cs
- ToolStripDropDownButton.cs
- HttpHandlerAction.cs
- ManagementException.cs
- ObjectSpanRewriter.cs
- AVElementHelper.cs
- FunctionImportElement.cs
- CodeExpressionStatement.cs
- StatusBar.cs
- CodeIdentifiers.cs
- CachedTypeface.cs
- ProfileGroupSettingsCollection.cs
- TemplateComponentConnector.cs
- CompilerLocalReference.cs
- ContextTokenTypeConverter.cs
- ContentPosition.cs
- FilterInvalidBodyAccessException.cs
- Vector.cs
- ItemAutomationPeer.cs
- PropertyOverridesTypeEditor.cs
- WebPartAuthorizationEventArgs.cs
- HtmlLink.cs
- AutomationPeer.cs
- BuildProviderUtils.cs
- _AutoWebProxyScriptHelper.cs
- PolicyManager.cs
- BoundingRectTracker.cs
- FormatConvertedBitmap.cs
- XpsInterleavingPolicy.cs
- FontSizeConverter.cs
- AsnEncodedData.cs
- XmlDomTextWriter.cs
- SymLanguageVendor.cs
- ContainerVisual.cs
- PerformanceCounterCategory.cs
- GestureRecognizer.cs
- XPathNodeIterator.cs
- RepeaterItem.cs
- SqlXmlStorage.cs
- ListViewAutomationPeer.cs
- ArraySubsetEnumerator.cs
- DefinitionProperties.cs
- PartitionedStreamMerger.cs
- RichTextBox.cs
- PerfService.cs
- CategoryEditor.cs
- UnsafeNativeMethods.cs
- DataFormats.cs
- IArgumentProvider.cs
- PerformanceCounterPermissionEntryCollection.cs
- WebSysDefaultValueAttribute.cs
- FragmentQuery.cs
- SelectionUIHandler.cs
- MailSettingsSection.cs
- WindowsGrip.cs
- ValueQuery.cs
- CodeIterationStatement.cs
- AgileSafeNativeMemoryHandle.cs
- ModelVisual3D.cs
- ByteConverter.cs
- XmlNodeReader.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- WorkflowRuntimeEndpoint.cs
- RegexCapture.cs
- FontStretchConverter.cs
- PrintDialogException.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- DependencySource.cs
- NotCondition.cs
- ConstraintStruct.cs
- WsatServiceCertificate.cs
- Domain.cs
- OpenTypeCommon.cs
- WorkerRequest.cs
- SqlAggregateChecker.cs