Code:
/ DotNET / DotNET / 8.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
- MessageQueue.cs
- DataTableReader.cs
- XmlNodeWriter.cs
- printdlgexmarshaler.cs
- ControlAdapter.cs
- xdrvalidator.cs
- FixedElement.cs
- ErrorWrapper.cs
- ExtractedStateEntry.cs
- AuthStoreRoleProvider.cs
- OutputCacheProfileCollection.cs
- GrammarBuilder.cs
- ThemeableAttribute.cs
- HtmlInputControl.cs
- BamlLocalizabilityResolver.cs
- DependencyObjectPropertyDescriptor.cs
- SmtpDigestAuthenticationModule.cs
- ContentHostHelper.cs
- RequiredAttributeAttribute.cs
- IsolatedStorageFile.cs
- WebPageTraceListener.cs
- VisualBasicSettingsConverter.cs
- FixedDSBuilder.cs
- ToggleProviderWrapper.cs
- MenuItemStyleCollection.cs
- RowUpdatedEventArgs.cs
- ReservationCollection.cs
- StateMachine.cs
- Line.cs
- FontSource.cs
- StringBlob.cs
- DataReaderContainer.cs
- SemaphoreSecurity.cs
- StyleXamlParser.cs
- VerifyHashRequest.cs
- URI.cs
- SafeCloseHandleCritical.cs
- Table.cs
- ConnectionInterfaceCollection.cs
- SecureEnvironment.cs
- ValueTypeFieldReference.cs
- QilGeneratorEnv.cs
- Int16Converter.cs
- StylusOverProperty.cs
- TargetException.cs
- BuildProviderAppliesToAttribute.cs
- TabControl.cs
- HttpWebRequest.cs
- RequestCache.cs
- PropertyKey.cs
- WSFederationHttpSecurityMode.cs
- TextDataBindingHandler.cs
- DataObjectAttribute.cs
- TableStyle.cs
- ParameterCollection.cs
- TileBrush.cs
- PerformanceCounters.cs
- DirectionalLight.cs
- ValidationHelper.cs
- X509ChainPolicy.cs
- Cursors.cs
- AudioSignalProblemOccurredEventArgs.cs
- LogStream.cs
- StandardTransformFactory.cs
- CodeEntryPointMethod.cs
- EdmItemCollection.OcAssemblyCache.cs
- ResourceProviderFactory.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- DoubleLinkListEnumerator.cs
- Solver.cs
- EmbeddedMailObjectCollectionEditor.cs
- OdbcConnection.cs
- EntityAdapter.cs
- DataFieldEditor.cs
- AccessorTable.cs
- HttpException.cs
- PrintPreviewControl.cs
- HtmlInputFile.cs
- SpAudioStreamWrapper.cs
- MessagePropertyFilter.cs
- XmlComment.cs
- ModelTreeManager.cs
- PropertyItemInternal.cs
- _UriTypeConverter.cs
- ThreadExceptionDialog.cs
- _SecureChannel.cs
- WebPartEditorOkVerb.cs
- PackageRelationshipCollection.cs
- Msmq4PoisonHandler.cs
- AggregatePushdown.cs
- OrderedHashRepartitionStream.cs
- ButtonChrome.cs
- ToolStripItem.cs
- CompressedStack.cs
- StringArrayConverter.cs
- login.cs
- LocalBuilder.cs
- SoapIncludeAttribute.cs
- EventLogPermissionAttribute.cs
- MLangCodePageEncoding.cs