Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 2 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeTypeReferenceCollection.cs
- SimplePropertyEntry.cs
- DataControlPagerLinkButton.cs
- MimeParameterWriter.cs
- BindStream.cs
- DynamicPropertyReader.cs
- TransportChannelFactory.cs
- FlowLayout.cs
- CompositeFontInfo.cs
- ControlBindingsCollection.cs
- LingerOption.cs
- LoginName.cs
- XmlSchemaImporter.cs
- FaultReason.cs
- EventProvider.cs
- Message.cs
- XPathParser.cs
- RepeatButtonAutomationPeer.cs
- Image.cs
- FileUtil.cs
- CheckBoxList.cs
- CodeGenerationManager.cs
- CachedTypeface.cs
- MarkupExtensionParser.cs
- BitmapCodecInfo.cs
- GroupItemAutomationPeer.cs
- BasicCommandTreeVisitor.cs
- uribuilder.cs
- IQueryable.cs
- AssociationTypeEmitter.cs
- FontEmbeddingManager.cs
- WebPartCollection.cs
- AttributeEmitter.cs
- XmlElementList.cs
- XmlSchemaComplexType.cs
- XPathAncestorIterator.cs
- OAVariantLib.cs
- WindowsFormsHost.cs
- XmlSerializerAssemblyAttribute.cs
- XmlNodeChangedEventManager.cs
- ParserContext.cs
- DesignerView.cs
- ColumnPropertiesGroup.cs
- WmpBitmapDecoder.cs
- ServerIdentity.cs
- LinqTreeNodeEvaluator.cs
- SecurityPolicySection.cs
- GeometryGroup.cs
- SecurityDescriptor.cs
- AsymmetricKeyExchangeDeformatter.cs
- DetailsViewRowCollection.cs
- SecurityState.cs
- StylusSystemGestureEventArgs.cs
- _ChunkParse.cs
- Typography.cs
- Rect3D.cs
- TypeUtils.cs
- DbReferenceCollection.cs
- PeerNameRecord.cs
- WebPartEventArgs.cs
- FieldDescriptor.cs
- SystemTcpStatistics.cs
- SafeLocalAllocation.cs
- StrongName.cs
- Assembly.cs
- PersonalizationState.cs
- StrongNameMembershipCondition.cs
- MetadataArtifactLoaderFile.cs
- ServiceDesigner.cs
- TemplateParser.cs
- WeakReferenceList.cs
- Int16.cs
- TreeNodeStyle.cs
- Cursors.cs
- UnconditionalPolicy.cs
- BigInt.cs
- SymLanguageType.cs
- ToolStripContentPanel.cs
- MasterPageBuildProvider.cs
- WebPartZone.cs
- DataGridViewButtonColumn.cs
- EmptyEnumerable.cs
- HyperlinkAutomationPeer.cs
- MtomMessageEncodingElement.cs
- WindowsEditBoxRange.cs
- WebRequest.cs
- WindowsListViewItemCheckBox.cs
- TextAdaptor.cs
- ClientRuntimeConfig.cs
- XmlSchemaAppInfo.cs
- CollectionChangedEventManager.cs
- ColorConvertedBitmap.cs
- XmlWrappingWriter.cs
- InternalsVisibleToAttribute.cs
- OleDbWrapper.cs
- HttpContext.cs
- SqlDataSourceStatusEventArgs.cs
- AuthenticatedStream.cs
- NumericUpDownAccelerationCollection.cs
- Config.cs