Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 1305376 / 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
- ModelItemDictionary.cs
- MultiBinding.cs
- UnknownBitmapEncoder.cs
- DesignerActionVerbList.cs
- HttpCookie.cs
- PageContentAsyncResult.cs
- WebSysDefaultValueAttribute.cs
- CompensationExtension.cs
- BindToObject.cs
- ProfileBuildProvider.cs
- VisualStyleRenderer.cs
- SchemaNames.cs
- AssemblyAttributesGoHere.cs
- Window.cs
- CssClassPropertyAttribute.cs
- UInt16Converter.cs
- CollectionChangedEventManager.cs
- FormCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- XamlSerializerUtil.cs
- LinkDescriptor.cs
- NavigationFailedEventArgs.cs
- CheckBoxRenderer.cs
- RSAOAEPKeyExchangeFormatter.cs
- ProfileProvider.cs
- ClientSettingsStore.cs
- BitmapEffectDrawingContent.cs
- FontConverter.cs
- AudienceUriMode.cs
- ByValueEqualityComparer.cs
- IgnorePropertiesAttribute.cs
- SqlSelectStatement.cs
- EnumerableCollectionView.cs
- AttributeQuery.cs
- LinkedResource.cs
- OracleBFile.cs
- QilDataSource.cs
- ScrollBarAutomationPeer.cs
- UnsafeNativeMethodsCLR.cs
- XmlEncodedRawTextWriter.cs
- TypeName.cs
- SoapDocumentMethodAttribute.cs
- UshortList2.cs
- TrackingMemoryStream.cs
- Page.cs
- TextFormatterImp.cs
- XPathScanner.cs
- XmlComplianceUtil.cs
- CommandDevice.cs
- CheckBox.cs
- AdapterUtil.cs
- DbConnectionPool.cs
- SharedDp.cs
- SafeCryptoHandles.cs
- NonceToken.cs
- UIPropertyMetadata.cs
- StylusDevice.cs
- ScrollableControl.cs
- LineVisual.cs
- RegularExpressionValidator.cs
- Stroke2.cs
- SizeChangedEventArgs.cs
- SecureUICommand.cs
- ExtendedPropertyCollection.cs
- PtsPage.cs
- FreezableCollection.cs
- WebResponse.cs
- TryExpression.cs
- ReferenceTypeElement.cs
- ObjectSpanRewriter.cs
- DbMetaDataFactory.cs
- BinHexDecoder.cs
- ObjectKeyFrameCollection.cs
- RecordsAffectedEventArgs.cs
- TrackingAnnotationCollection.cs
- Expression.cs
- COM2Enum.cs
- SafeViewOfFileHandle.cs
- ExpressionBuilder.cs
- EventWaitHandleSecurity.cs
- QilFunction.cs
- IisTraceWebEventProvider.cs
- TabletDeviceInfo.cs
- GridViewColumnHeaderAutomationPeer.cs
- QilTargetType.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- WebServiceTypeData.cs
- TypeElementCollection.cs
- PropertyInformationCollection.cs
- Validator.cs
- RegistrySecurity.cs
- PathFigure.cs
- UriTemplateCompoundPathSegment.cs
- AssociationSetMetadata.cs
- SectionRecord.cs
- ISO2022Encoding.cs
- DesignerAttribute.cs
- NullNotAllowedCollection.cs
- HtmlTableCell.cs
- ProjectionPath.cs