Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ServiceCredentialsElement.cs
- ValidationRule.cs
- Expression.cs
- XmlEnumAttribute.cs
- FacetChecker.cs
- VerificationException.cs
- NamedPermissionSet.cs
- WindowsGraphicsWrapper.cs
- ArgumentOutOfRangeException.cs
- DbParameterCollectionHelper.cs
- PixelShader.cs
- ManagedCodeMarkers.cs
- AppDomainShutdownMonitor.cs
- SchemaObjectWriter.cs
- Task.cs
- XmlILTrace.cs
- KeyMatchBuilder.cs
- UnauthorizedAccessException.cs
- Set.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- XmlElementCollection.cs
- InternalRelationshipCollection.cs
- HtmlInputHidden.cs
- AjaxFrameworkAssemblyAttribute.cs
- SqlXml.cs
- CompositeClientFormatter.cs
- CategoryEditor.cs
- EncoderFallback.cs
- TextBoxAutoCompleteSourceConverter.cs
- StorageModelBuildProvider.cs
- ResourceAssociationType.cs
- SoundPlayerAction.cs
- _CacheStreams.cs
- HitTestResult.cs
- TreeNodeBinding.cs
- FastPropertyAccessor.cs
- HttpCacheVaryByContentEncodings.cs
- LocalizableResourceBuilder.cs
- CodeGroup.cs
- SqlClientWrapperSmiStream.cs
- WebBrowserNavigatingEventHandler.cs
- WorkflowViewService.cs
- ShaperBuffers.cs
- XmlSchemaSequence.cs
- UnaryNode.cs
- SqlStatistics.cs
- ContextBase.cs
- FileVersionInfo.cs
- ComponentChangingEvent.cs
- ExpressionUtilities.cs
- AxisAngleRotation3D.cs
- WebBrowsableAttribute.cs
- Enum.cs
- ActivityExecutorSurrogate.cs
- HttpPostProtocolImporter.cs
- TextElementEnumerator.cs
- BulletChrome.cs
- RestClientProxyHandler.cs
- InfoCardArgumentException.cs
- diagnosticsswitches.cs
- HostVisual.cs
- WebDisplayNameAttribute.cs
- ReflectionTypeLoadException.cs
- RegexRunnerFactory.cs
- XmlSchemaChoice.cs
- NetworkCredential.cs
- ModelUtilities.cs
- DoubleLinkListEnumerator.cs
- Proxy.cs
- MultiDataTrigger.cs
- HtmlLiteralTextAdapter.cs
- SmiEventSink.cs
- Polygon.cs
- FrameAutomationPeer.cs
- SQLInt16.cs
- MetadataHelper.cs
- EntityUtil.cs
- XPathExpr.cs
- ElementNotAvailableException.cs
- ImportContext.cs
- ThreadStartException.cs
- BuildResult.cs
- HtmlInputRadioButton.cs
- StateMachineWorkflowDesigner.cs
- EntityDesignPluralizationHandler.cs
- CommonGetThemePartSize.cs
- ProgressBar.cs
- MSAAEventDispatcher.cs
- FragmentQueryProcessor.cs
- HealthMonitoringSection.cs
- Point.cs
- DataGridViewRowPrePaintEventArgs.cs
- _RequestCacheProtocol.cs
- XmlSubtreeReader.cs
- TabPage.cs
- FacetChecker.cs
- Compress.cs
- CubicEase.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- AccessDataSource.cs