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
- DateTimePicker.cs
- CSharpCodeProvider.cs
- CodeNamespaceImportCollection.cs
- DbProviderServices.cs
- HtmlLink.cs
- ZipIOModeEnforcingStream.cs
- HotSpotCollection.cs
- DataGridViewDataConnection.cs
- HandoffBehavior.cs
- XmlSchemaChoice.cs
- CodeIdentifier.cs
- CellCreator.cs
- Assembly.cs
- StringArrayConverter.cs
- FixedSOMLineRanges.cs
- Bitmap.cs
- ColorConvertedBitmap.cs
- ListenerServiceInstallComponent.cs
- DataControlLinkButton.cs
- CanExecuteRoutedEventArgs.cs
- PersonalizationState.cs
- mactripleDES.cs
- ScrollEvent.cs
- TPLETWProvider.cs
- COAUTHIDENTITY.cs
- ScrollBarAutomationPeer.cs
- DataTableMapping.cs
- StorageComplexPropertyMapping.cs
- ViewBox.cs
- ControlPaint.cs
- RC2.cs
- NegotiateStream.cs
- LinkUtilities.cs
- ToolStripSplitButton.cs
- MenuItemStyleCollectionEditor.cs
- newinstructionaction.cs
- GridViewUpdateEventArgs.cs
- CryptoConfig.cs
- ContextMenu.cs
- ArrayList.cs
- COM2Properties.cs
- ConfigDefinitionUpdates.cs
- StreamInfo.cs
- TraceHandler.cs
- GeometryModel3D.cs
- ConfigurationSection.cs
- HwndSourceParameters.cs
- TextEditorThreadLocalStore.cs
- TempFiles.cs
- ChildrenQuery.cs
- BoolLiteral.cs
- ActiveXSite.cs
- References.cs
- ChannelDispatcherCollection.cs
- COM2ColorConverter.cs
- ExpressionVisitorHelpers.cs
- ApplicationGesture.cs
- WebDisplayNameAttribute.cs
- ReferencedCollectionType.cs
- ReachSerializer.cs
- SymDocumentType.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- PolicyStatement.cs
- StateDesigner.CommentLayoutGlyph.cs
- Helper.cs
- GenericPrincipal.cs
- PassportAuthentication.cs
- DynamicAttribute.cs
- WrapPanel.cs
- WebPartAddingEventArgs.cs
- XPathCompileException.cs
- TextMarkerSource.cs
- SecurityState.cs
- BitVector32.cs
- Code.cs
- LocatorBase.cs
- CharacterHit.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- CalendarDay.cs
- DataTableReaderListener.cs
- XmlBoundElement.cs
- ObjectResult.cs
- HtmlControlAdapter.cs
- MessageBox.cs
- TextTreeRootNode.cs
- IntSecurity.cs
- MethodBuilderInstantiation.cs
- SQLResource.cs
- DecimalConverter.cs
- Int64AnimationUsingKeyFrames.cs
- FileDialogPermission.cs
- ReflectionUtil.cs
- SettingsAttributeDictionary.cs
- XmlLanguageConverter.cs
- XPathBinder.cs
- BezierSegment.cs
- SoapIncludeAttribute.cs
- EasingQuaternionKeyFrame.cs
- DoubleLink.cs
- RemotingAttributes.cs