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
- DataTable.cs
- TreeNodeStyleCollectionEditor.cs
- EventSourceCreationData.cs
- NetNamedPipeBindingElement.cs
- ExtensionSimplifierMarkupObject.cs
- SchemaElementLookUpTable.cs
- AmbientProperties.cs
- InsufficientMemoryException.cs
- AsyncCompletedEventArgs.cs
- SafeRightsManagementQueryHandle.cs
- MultipartContentParser.cs
- EdgeProfileValidation.cs
- AliasedExpr.cs
- PermissionListSet.cs
- CheckPair.cs
- ModelTreeEnumerator.cs
- CreateInstanceBinder.cs
- AnonymousIdentificationModule.cs
- X509SecurityToken.cs
- ContextStack.cs
- TimeSpanStorage.cs
- FocusChangedEventArgs.cs
- SortFieldComparer.cs
- IntranetCredentialPolicy.cs
- XmlTextWriter.cs
- DSACryptoServiceProvider.cs
- XmlAtomErrorReader.cs
- CacheOutputQuery.cs
- DocumentPageView.cs
- IApplicationTrustManager.cs
- TcpChannelListener.cs
- WebPartDeleteVerb.cs
- XmlHelper.cs
- GraphicsPath.cs
- Native.cs
- PropertyGeneratedEventArgs.cs
- SecurityException.cs
- Process.cs
- HttpWebRequestElement.cs
- IncomingWebRequestContext.cs
- ResourceExpressionBuilder.cs
- RbTree.cs
- LingerOption.cs
- RenderingEventArgs.cs
- SplitterPanel.cs
- ConditionCollection.cs
- InternalPolicyElement.cs
- FragmentQuery.cs
- CodeGen.cs
- SspiSecurityToken.cs
- CacheChildrenQuery.cs
- PropertyMap.cs
- SafeNativeMethodsOther.cs
- SafeRightsManagementHandle.cs
- SqlTrackingService.cs
- DataGridViewColumnConverter.cs
- RadioButtonBaseAdapter.cs
- CqlBlock.cs
- WbmpConverter.cs
- MSAAEventDispatcher.cs
- ComboBoxRenderer.cs
- BamlRecordReader.cs
- ObjectTag.cs
- DBConnection.cs
- OutputCacheProfileCollection.cs
- LessThanOrEqual.cs
- XmlHierarchicalEnumerable.cs
- AsyncResult.cs
- DeliveryStrategy.cs
- SspiSafeHandles.cs
- HandleCollector.cs
- PresentationSource.cs
- PreProcessInputEventArgs.cs
- ImageKeyConverter.cs
- XPathNodePointer.cs
- OSFeature.cs
- SuppressMergeCheckAttribute.cs
- PrinterResolution.cs
- DecimalStorage.cs
- SerializationEventsCache.cs
- StylusPointPropertyId.cs
- FileLogRecordEnumerator.cs
- DiscoveryClientDocuments.cs
- InheritanceContextHelper.cs
- AttributeProviderAttribute.cs
- ListViewItem.cs
- SHA256.cs
- SqlCacheDependencyDatabase.cs
- GetWinFXPath.cs
- FormClosingEvent.cs
- DetailsViewInsertEventArgs.cs
- DeploymentSectionCache.cs
- ColumnWidthChangedEvent.cs
- WsatConfiguration.cs
- XmlAggregates.cs
- WhitespaceRuleLookup.cs
- FunctionCommandText.cs
- Globals.cs
- DBParameter.cs
- DataServiceProviderWrapper.cs