Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 1305376 / 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
- TargetInvocationException.cs
- altserialization.cs
- FileDetails.cs
- Decoder.cs
- QuaternionKeyFrameCollection.cs
- LinkedList.cs
- AutomationIdentifier.cs
- PaperSource.cs
- PeerApplication.cs
- GuidelineSet.cs
- StylusPlugInCollection.cs
- CodeSnippetStatement.cs
- Win32.cs
- SplitterCancelEvent.cs
- RSACryptoServiceProvider.cs
- BitmapFrameDecode.cs
- TreeNodeCollection.cs
- EmptyCollection.cs
- UIntPtr.cs
- XmlComment.cs
- COM2PictureConverter.cs
- TemplateBamlTreeBuilder.cs
- RoleBoolean.cs
- LessThan.cs
- ExtendedPropertyInfo.cs
- WebPartConnectionsCancelEventArgs.cs
- EtwTrackingBehaviorElement.cs
- Vector3DAnimationUsingKeyFrames.cs
- BrowserCapabilitiesFactory.cs
- IFlowDocumentViewer.cs
- ServiceDesigner.cs
- InstanceKeyCompleteException.cs
- EmptyStringExpandableObjectConverter.cs
- SQLDoubleStorage.cs
- SiblingIterators.cs
- DataRelation.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- MediaEntryAttribute.cs
- XamlContextStack.cs
- XmlTextAttribute.cs
- WmpBitmapDecoder.cs
- CurrentTimeZone.cs
- XmlQueryRuntime.cs
- Rectangle.cs
- lengthconverter.cs
- FieldAccessException.cs
- ExceptionHelpers.cs
- AdapterUtil.cs
- ViewValidator.cs
- UnaryNode.cs
- SiteMapDataSource.cs
- ApplicationHost.cs
- DisplayNameAttribute.cs
- OpenFileDialog.cs
- SizeAnimationBase.cs
- WsdlInspector.cs
- XmlNamespaceManager.cs
- BooleanStorage.cs
- UncommonField.cs
- DmlSqlGenerator.cs
- SequenceFullException.cs
- DataExpression.cs
- AuthenticateEventArgs.cs
- RelationshipManager.cs
- HelpEvent.cs
- PreviewPrintController.cs
- OverrideMode.cs
- VersionPair.cs
- HtmlTitle.cs
- Package.cs
- CompilationUnit.cs
- SmtpSection.cs
- ScrollBar.cs
- OutputCacheProviderCollection.cs
- DataGridCommandEventArgs.cs
- BaseHashHelper.cs
- Blend.cs
- MessageFilterTable.cs
- InvariantComparer.cs
- CollectionViewProxy.cs
- HtmlTableRow.cs
- SystemColors.cs
- ProcessThread.cs
- ListViewGroupCollectionEditor.cs
- StaticExtension.cs
- TypedColumnHandler.cs
- SessionStateContainer.cs
- ServiceMetadataExtension.cs
- TrackingConditionCollection.cs
- LinkClickEvent.cs
- LogManagementAsyncResult.cs
- MediaScriptCommandRoutedEventArgs.cs
- TextShapeableCharacters.cs
- EntityTypeEmitter.cs
- PropertyItem.cs
- ScopelessEnumAttribute.cs
- relpropertyhelper.cs
- PageRouteHandler.cs
- TypeGeneratedEventArgs.cs
- ACE.cs