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
- MimeAnyImporter.cs
- CheckPair.cs
- TableLayoutSettingsTypeConverter.cs
- NotificationContext.cs
- HTTPNotFoundHandler.cs
- CodeNamespaceImport.cs
- StringCollection.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- PartManifestEntry.cs
- ToolStripDropDownButton.cs
- ClientSettingsSection.cs
- WriteFileContext.cs
- FakeModelPropertyImpl.cs
- SynchronizedDispatch.cs
- SurrogateEncoder.cs
- MethodRental.cs
- BinHexEncoding.cs
- ToolStripItemCollection.cs
- WorkflowInstanceQuery.cs
- BitmapEffectrendercontext.cs
- AtomParser.cs
- HttpCookie.cs
- TreeView.cs
- NullableIntSumAggregationOperator.cs
- DragSelectionMessageFilter.cs
- SQLMoney.cs
- HtmlTextArea.cs
- TranslateTransform3D.cs
- PrivilegedConfigurationManager.cs
- WindowsSecurityTokenAuthenticator.cs
- DataListItem.cs
- ZipIOFileItemStream.cs
- ExpressionSelection.cs
- cache.cs
- ConstructorBuilder.cs
- Events.cs
- GuidelineSet.cs
- RecordBuilder.cs
- UpDownEvent.cs
- GridViewDeleteEventArgs.cs
- GridViewAutomationPeer.cs
- HtmlTableRowCollection.cs
- Binding.cs
- KeyProperty.cs
- ContentPlaceHolderDesigner.cs
- UnsignedPublishLicense.cs
- QilFunction.cs
- ResourceDescriptionAttribute.cs
- ProxyWebPartManager.cs
- ThreadStateException.cs
- BufferedGraphicsContext.cs
- GraphicsPathIterator.cs
- ListViewTableCell.cs
- SqlFacetAttribute.cs
- DynamicDataExtensions.cs
- DigitalSignature.cs
- EditorPartCollection.cs
- Timeline.cs
- NamespaceMapping.cs
- RepeatButtonAutomationPeer.cs
- ProcessHostFactoryHelper.cs
- DataColumnPropertyDescriptor.cs
- ItemChangedEventArgs.cs
- UInt64.cs
- DispatcherEventArgs.cs
- ExtendedPropertiesHandler.cs
- DocumentAutomationPeer.cs
- HexParser.cs
- DataGridViewRowCollection.cs
- JpegBitmapEncoder.cs
- ControlAdapter.cs
- CrossContextChannel.cs
- SessionViewState.cs
- CharUnicodeInfo.cs
- WorkflowMessageEventHandler.cs
- TrustManager.cs
- CharEntityEncoderFallback.cs
- RegistrationServices.cs
- SizeChangedInfo.cs
- WizardPanelChangingEventArgs.cs
- ImportContext.cs
- Types.cs
- DoubleLinkListEnumerator.cs
- LinqDataSourceInsertEventArgs.cs
- SimpleTextLine.cs
- WebPartMenu.cs
- JavaScriptSerializer.cs
- HybridDictionary.cs
- AuditLog.cs
- DropDownButton.cs
- ConfigurationElementProperty.cs
- StaticExtension.cs
- StatusBar.cs
- ScriptManager.cs
- RepeatEnumerable.cs
- safePerfProviderHandle.cs
- MissingMemberException.cs
- LiteralControl.cs
- GenerateHelper.cs
- TypeUsage.cs