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
- DaylightTime.cs
- SqlRewriteScalarSubqueries.cs
- FeatureManager.cs
- TagElement.cs
- SymbolType.cs
- MissingMemberException.cs
- Imaging.cs
- CodeMethodReturnStatement.cs
- TextContainer.cs
- XamlPointCollectionSerializer.cs
- wgx_render.cs
- EditBehavior.cs
- UseAttributeSetsAction.cs
- DesignerUtility.cs
- _ConnectStream.cs
- PathNode.cs
- selecteditemcollection.cs
- SchemaElement.cs
- DescendantOverDescendantQuery.cs
- ServiceHostFactory.cs
- OleDbErrorCollection.cs
- FormatConvertedBitmap.cs
- ImageIndexEditor.cs
- EntitySetDataBindingList.cs
- BrowserCapabilitiesCodeGenerator.cs
- PictureBox.cs
- PrimarySelectionAdorner.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- ToolStripSplitStackLayout.cs
- SafeLibraryHandle.cs
- Visual3DCollection.cs
- HTTPRemotingHandler.cs
- MailHeaderInfo.cs
- OciEnlistContext.cs
- ResourcesChangeInfo.cs
- StyleBamlTreeBuilder.cs
- FixedSOMContainer.cs
- NameValueSectionHandler.cs
- BrowserCapabilitiesCompiler.cs
- AppDomainAttributes.cs
- Quaternion.cs
- CompilerResults.cs
- BindingsCollection.cs
- CollectionEditorDialog.cs
- SystemMulticastIPAddressInformation.cs
- StatusBar.cs
- SqlConnectionPoolProviderInfo.cs
- DataGridViewMethods.cs
- ToolStripRendererSwitcher.cs
- RoleService.cs
- SudsCommon.cs
- XmlSchemaAny.cs
- LinqExpressionNormalizer.cs
- COM2FontConverter.cs
- ClientSettingsSection.cs
- AppLevelCompilationSectionCache.cs
- XpsFontSubsetter.cs
- CompressEmulationStream.cs
- ToolboxComponentsCreatedEventArgs.cs
- XmlUrlEditor.cs
- TextServicesCompartmentEventSink.cs
- Int16Converter.cs
- _OSSOCK.cs
- EditorZone.cs
- MsmqReceiveHelper.cs
- NativeWindow.cs
- GACMembershipCondition.cs
- XPathMessageContext.cs
- Point3DCollectionConverter.cs
- SafeProcessHandle.cs
- ObjectConverter.cs
- BlockCollection.cs
- ProgressiveCrcCalculatingStream.cs
- XmlHierarchicalEnumerable.cs
- FileUpload.cs
- CollectionViewProxy.cs
- ProviderUtil.cs
- DeferrableContent.cs
- DataGridViewColumnConverter.cs
- ProcessModuleCollection.cs
- Error.cs
- SelectionProcessor.cs
- DeclarativeCatalogPart.cs
- MasterPage.cs
- XPathNodeInfoAtom.cs
- DefaultValueTypeConverter.cs
- ControlValuePropertyAttribute.cs
- HostingPreferredMapPath.cs
- WebPartManager.cs
- HandlerBase.cs
- ObjectDataSourceFilteringEventArgs.cs
- BackgroundWorker.cs
- FamilyMapCollection.cs
- CryptoKeySecurity.cs
- Site.cs
- JsonObjectDataContract.cs
- WindowsFormsSectionHandler.cs
- BeginStoryboard.cs
- StringDictionary.cs
- BatchServiceHost.cs