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
- HierarchicalDataBoundControl.cs
- InputLanguageCollection.cs
- DataGridViewCell.cs
- HttpApplication.cs
- XamlBrushSerializer.cs
- hresults.cs
- ListViewEditEventArgs.cs
- CommandDesigner.cs
- ApplyHostConfigurationBehavior.cs
- TimeManager.cs
- NetWebProxyFinder.cs
- XPathConvert.cs
- SharedPerformanceCounter.cs
- ParseNumbers.cs
- Point3DCollectionConverter.cs
- WebPartUtil.cs
- IMembershipProvider.cs
- TransformCollection.cs
- AuthenticateEventArgs.cs
- PrePrepareMethodAttribute.cs
- MatrixAnimationUsingKeyFrames.cs
- ThreadStateException.cs
- WorkerRequest.cs
- ReferencedType.cs
- DatatypeImplementation.cs
- Privilege.cs
- ReaderOutput.cs
- TextRunProperties.cs
- ExpandButtonVisibilityConverter.cs
- ClientRoleProvider.cs
- InheritanceAttribute.cs
- ConcurrentBag.cs
- ViewUtilities.cs
- QilStrConcatenator.cs
- SchemaImporterExtensionElementCollection.cs
- AsmxEndpointPickerExtension.cs
- Constants.cs
- CurrentChangingEventArgs.cs
- FormatterServices.cs
- TransformCollection.cs
- HttpCapabilitiesEvaluator.cs
- CompiledIdentityConstraint.cs
- MessageSecurityVersion.cs
- WorkerRequest.cs
- Tokenizer.cs
- AlphabeticalEnumConverter.cs
- WebPartConnectionsCloseVerb.cs
- XamlFxTrace.cs
- BinaryParser.cs
- CommandConverter.cs
- UrlMappingCollection.cs
- ContextBase.cs
- PenLineJoinValidation.cs
- GlobalDataBindingHandler.cs
- NameService.cs
- HandledEventArgs.cs
- DrawingCollection.cs
- GroupLabel.cs
- Update.cs
- XmlChildEnumerator.cs
- PolicyAssertionCollection.cs
- OraclePermission.cs
- BindableAttribute.cs
- HiddenField.cs
- FontCacheLogic.cs
- BitmapEffectInput.cs
- BufferedGraphicsContext.cs
- PerformanceCountersElement.cs
- WebResourceAttribute.cs
- Operator.cs
- BreakSafeBase.cs
- StorageTypeMapping.cs
- FullTextState.cs
- ClientCultureInfo.cs
- MULTI_QI.cs
- XsltArgumentList.cs
- SamlAuthenticationStatement.cs
- DataSourceIDConverter.cs
- SecurityPolicySection.cs
- CompilerScopeManager.cs
- InitializingNewItemEventArgs.cs
- OperationResponse.cs
- HttpCookieCollection.cs
- GeometryHitTestResult.cs
- BufferedWebEventProvider.cs
- DataRelation.cs
- MethodRental.cs
- TableItemStyle.cs
- FrameworkElementFactoryMarkupObject.cs
- SpecularMaterial.cs
- MetabaseServerConfig.cs
- HtmlLink.cs
- OrderPreservingSpoolingTask.cs
- SearchExpression.cs
- RoleGroup.cs
- WebConfigurationHostFileChange.cs
- TreeNodeMouseHoverEvent.cs
- LayoutTableCell.cs
- XmlNamespaceMapping.cs
- ZipIOFileItemStream.cs