Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConfigXmlReader.cs
- ProtocolState.cs
- FlowDocumentReaderAutomationPeer.cs
- KnownBoxes.cs
- CriticalExceptions.cs
- ValueProviderWrapper.cs
- codemethodreferenceexpression.cs
- SineEase.cs
- HttpListenerElement.cs
- BrowserTree.cs
- SecurityContext.cs
- TaskExtensions.cs
- TargetException.cs
- Button.cs
- XmlSchemaSequence.cs
- ToolStripItemCollection.cs
- PackageFilter.cs
- MemberCollection.cs
- PopupEventArgs.cs
- HierarchicalDataSourceControl.cs
- TraceSource.cs
- ModelItemDictionary.cs
- Queue.cs
- SystemWebCachingSectionGroup.cs
- TextMessageEncodingBindingElement.cs
- ListSourceHelper.cs
- PersonalizablePropertyEntry.cs
- RangeBase.cs
- ReadOnlyAttribute.cs
- ComponentChangedEvent.cs
- StringStorage.cs
- FormViewUpdatedEventArgs.cs
- OpenTypeCommon.cs
- Crypto.cs
- UnmanagedMarshal.cs
- WindowsScroll.cs
- CollectionChangedEventManager.cs
- PropertyDescriptorGridEntry.cs
- MTConfigUtil.cs
- CustomErrorsSection.cs
- SafeNativeMethodsMilCoreApi.cs
- GregorianCalendar.cs
- StreamWriter.cs
- FrameworkPropertyMetadata.cs
- EditingMode.cs
- CombinedGeometry.cs
- MediaTimeline.cs
- MessageQueueCriteria.cs
- PopupEventArgs.cs
- CodeCompileUnit.cs
- WindowsListBox.cs
- CheckedPointers.cs
- AmbientProperties.cs
- DataObjectSettingDataEventArgs.cs
- SqlMethodAttribute.cs
- UxThemeWrapper.cs
- OrCondition.cs
- WindowsButton.cs
- ProviderIncompatibleException.cs
- ButtonFlatAdapter.cs
- WebBrowserProgressChangedEventHandler.cs
- DataConnectionHelper.cs
- DbConnectionPoolGroupProviderInfo.cs
- ApplicationServicesHostFactory.cs
- Control.cs
- WpfWebRequestHelper.cs
- BindingSource.cs
- FixedSOMTextRun.cs
- baseshape.cs
- PasswordTextContainer.cs
- XPathScanner.cs
- MarshalDirectiveException.cs
- Color.cs
- SystemIPInterfaceStatistics.cs
- CqlParser.cs
- MissingMemberException.cs
- DataRowComparer.cs
- FontCacheUtil.cs
- MarshalByRefObject.cs
- LocalizationComments.cs
- StorageFunctionMapping.cs
- CollectionDataContractAttribute.cs
- securestring.cs
- XmlSerializationWriter.cs
- ScrollItemPattern.cs
- ArgumentException.cs
- PenThreadPool.cs
- WebPartVerbsEventArgs.cs
- TreeNodeCollectionEditor.cs
- Merger.cs
- HttpHostedTransportConfiguration.cs
- SystemTcpStatistics.cs
- ProfileParameter.cs
- ValueQuery.cs
- FixedSOMPage.cs
- SerializationInfoEnumerator.cs
- MenuBindingsEditorForm.cs
- StateFinalizationDesigner.cs
- AppModelKnownContentFactory.cs
- Encoder.cs