Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 1 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- KeyboardDevice.cs
- DefaultTextStore.cs
- IdentifierCreationService.cs
- HelpEvent.cs
- HttpCapabilitiesSectionHandler.cs
- basecomparevalidator.cs
- PixelShader.cs
- ContainerControlDesigner.cs
- RegisteredDisposeScript.cs
- DESCryptoServiceProvider.cs
- ProcessHostMapPath.cs
- ClientCultureInfo.cs
- ToolStripInSituService.cs
- ExpressionHelper.cs
- OdbcRowUpdatingEvent.cs
- WindowsListView.cs
- MetadataWorkspace.cs
- Expressions.cs
- ExpressionHelper.cs
- XmlQueryCardinality.cs
- ManagedCodeMarkers.cs
- XmlSchemaDatatype.cs
- NameTable.cs
- CursorEditor.cs
- CanonicalXml.cs
- ContentDesigner.cs
- CompiledQuery.cs
- RenderData.cs
- ComAdminWrapper.cs
- ViewBox.cs
- SubMenuStyleCollectionEditor.cs
- PropertyPathWorker.cs
- ListViewDeleteEventArgs.cs
- StyleCollection.cs
- EncodingNLS.cs
- FamilyTypefaceCollection.cs
- AttributeCollection.cs
- IteratorFilter.cs
- ChangeProcessor.cs
- ProfessionalColors.cs
- StandardToolWindows.cs
- OracleSqlParser.cs
- DaylightTime.cs
- SubclassTypeValidator.cs
- _BaseOverlappedAsyncResult.cs
- TranslateTransform.cs
- DataControlLinkButton.cs
- VariableModifiersHelper.cs
- DataGridViewColumnConverter.cs
- WindowsListViewItem.cs
- FamilyTypefaceCollection.cs
- HttpCachePolicyBase.cs
- ChineseLunisolarCalendar.cs
- SystemIPInterfaceStatistics.cs
- ResizingMessageFilter.cs
- ParserOptions.cs
- UdpDiscoveryMessageFilter.cs
- DataServiceRequestException.cs
- TargetParameterCountException.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- CodeEventReferenceExpression.cs
- ComplexPropertyEntry.cs
- SweepDirectionValidation.cs
- XmlnsCompatibleWithAttribute.cs
- XmlDocument.cs
- ContainerSelectorBehavior.cs
- MediaScriptCommandRoutedEventArgs.cs
- ListViewInsertionMark.cs
- DataControlLinkButton.cs
- DbResourceAllocator.cs
- OdbcUtils.cs
- FrameworkTextComposition.cs
- AvTraceFormat.cs
- TerminateSequenceResponse.cs
- WriteableBitmap.cs
- PartialCachingControl.cs
- COM2FontConverter.cs
- TranslateTransform3D.cs
- GridViewSortEventArgs.cs
- ZoneLinkButton.cs
- contentDescriptor.cs
- WebPermission.cs
- MbpInfo.cs
- PageCache.cs
- MetadataFile.cs
- Peer.cs
- XmlUrlResolver.cs
- ButtonChrome.cs
- _NestedSingleAsyncResult.cs
- FixedFindEngine.cs
- ImageListUtils.cs
- DataServiceRequest.cs
- ServiceProviders.cs
- ReversePositionQuery.cs
- CounterNameConverter.cs
- WebPartMovingEventArgs.cs
- CatalogZone.cs
- ActiveXHost.cs
- XmlValidatingReaderImpl.cs
- ToolstripProfessionalRenderer.cs