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
- DtdParser.cs
- DesignColumnCollection.cs
- DbConnectionFactory.cs
- HostingEnvironment.cs
- BamlRecords.cs
- NetDataContractSerializer.cs
- OutputScopeManager.cs
- IdentifierService.cs
- TranslateTransform.cs
- FrameworkContentElement.cs
- ItemList.cs
- IERequestCache.cs
- Permission.cs
- ServiceModelActivity.cs
- SqlErrorCollection.cs
- ActiveDocumentEvent.cs
- Variant.cs
- DataPagerFieldCollection.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- VoiceSynthesis.cs
- PositiveTimeSpanValidator.cs
- ResolveNameEventArgs.cs
- TypedTableBase.cs
- EventLogReader.cs
- Environment.cs
- BinaryWriter.cs
- ToolStripItemEventArgs.cs
- IisTraceWebEventProvider.cs
- PeerTransportListenAddressConverter.cs
- OpCopier.cs
- ContractValidationHelper.cs
- ObjectStateFormatter.cs
- FacetDescriptionElement.cs
- CodeDomConfigurationHandler.cs
- RadioButton.cs
- ToolStripGripRenderEventArgs.cs
- DataControlFieldCollection.cs
- SqlPersonalizationProvider.cs
- Registry.cs
- RSAPKCS1SignatureDeformatter.cs
- HwndSource.cs
- MobileListItem.cs
- DataBindingValueUIHandler.cs
- Vector.cs
- XmlIlVisitor.cs
- ChannelManager.cs
- SharedUtils.cs
- StyleBamlRecordReader.cs
- HttpCacheVaryByContentEncodings.cs
- CodeObjectCreateExpression.cs
- UidPropertyAttribute.cs
- DiffuseMaterial.cs
- PersonalizationDictionary.cs
- Pair.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ComponentEditorForm.cs
- RoutedUICommand.cs
- DiscriminatorMap.cs
- OAVariantLib.cs
- DLinqDataModelProvider.cs
- PathData.cs
- OrderedDictionaryStateHelper.cs
- CodeGeneratorOptions.cs
- QueryExecutionOption.cs
- SelectionProviderWrapper.cs
- EncodingTable.cs
- XpsManager.cs
- SchemaMerger.cs
- GeneralTransform.cs
- ServiceProviders.cs
- NativeObjectSecurity.cs
- TcpTransportBindingElement.cs
- ScriptMethodAttribute.cs
- AddInAttribute.cs
- RepeaterItemEventArgs.cs
- ContentDesigner.cs
- SingleAnimation.cs
- GeneralTransform2DTo3DTo2D.cs
- TypeInitializationException.cs
- DiscreteKeyFrames.cs
- MutexSecurity.cs
- PathNode.cs
- OleDbEnumerator.cs
- ImpersonateTokenRef.cs
- CodeMemberEvent.cs
- WebServiceHandlerFactory.cs
- SoapFault.cs
- FixUp.cs
- XmlSchemaSimpleTypeUnion.cs
- WebPartCollection.cs
- invalidudtexception.cs
- DbMetaDataCollectionNames.cs
- SoapWriter.cs
- StreamGeometryContext.cs
- PreservationFileWriter.cs
- EntityDesignerBuildProvider.cs
- PartialClassGenerationTaskInternal.cs
- GeneratedCodeAttribute.cs
- Size3D.cs
- HorizontalAlignConverter.cs