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
- CodeTypeReferenceExpression.cs
- NavigatorOutput.cs
- CounterCreationData.cs
- TransactedBatchingBehavior.cs
- ClientBuildManagerCallback.cs
- XmlSchemaSimpleTypeList.cs
- SwitchElementsCollection.cs
- CharUnicodeInfo.cs
- IDictionary.cs
- SetterTriggerConditionValueConverter.cs
- DataRecordInfo.cs
- RemotingSurrogateSelector.cs
- PackagingUtilities.cs
- PersonalizationStateQuery.cs
- StyleSheetRefUrlEditor.cs
- HttpModulesSection.cs
- HTTPNotFoundHandler.cs
- DataGridViewRowPrePaintEventArgs.cs
- ChildDocumentBlock.cs
- JsonDeserializer.cs
- _Rfc2616CacheValidators.cs
- DataGridClipboardHelper.cs
- SiteMapHierarchicalDataSourceView.cs
- FunctionMappingTranslator.cs
- ButtonPopupAdapter.cs
- Equal.cs
- Transform.cs
- ResourceKey.cs
- WebException.cs
- HybridObjectCache.cs
- RegexParser.cs
- DataGridTextBoxColumn.cs
- UnsignedPublishLicense.cs
- Matrix.cs
- WorkflowMarkupElementEventArgs.cs
- PageSettings.cs
- GroupBox.cs
- UrlPath.cs
- SqlColumnizer.cs
- FunctionNode.cs
- WebPartManagerInternals.cs
- XsdDataContractImporter.cs
- ProtocolViolationException.cs
- UnionCodeGroup.cs
- FormViewCommandEventArgs.cs
- WinEventQueueItem.cs
- FaultPropagationQuery.cs
- DataGridTablesFactory.cs
- MimeWriter.cs
- HttpResponseInternalWrapper.cs
- TimeSpanOrInfiniteValidator.cs
- TreeNodeBinding.cs
- SemanticBasicElement.cs
- Compiler.cs
- RegexNode.cs
- DiscoveryEndpoint.cs
- ValueCollectionParameterReader.cs
- Misc.cs
- Partitioner.cs
- TypeConverterAttribute.cs
- SymLanguageVendor.cs
- EventWaitHandle.cs
- DropDownButton.cs
- SafeCloseHandleCritical.cs
- DataTableReader.cs
- FactoryMaker.cs
- AndCondition.cs
- ModelProperty.cs
- StyleModeStack.cs
- GroupDescription.cs
- MetadataLocation.cs
- NonParentingControl.cs
- ECDiffieHellmanCngPublicKey.cs
- ValueUtilsSmi.cs
- SqlVisitor.cs
- NameSpaceExtractor.cs
- FileCodeGroup.cs
- ConstraintCollection.cs
- XmlHelper.cs
- ByteViewer.cs
- CatalogPart.cs
- TraceSection.cs
- IncrementalReadDecoders.cs
- RSAPKCS1SignatureFormatter.cs
- DataGridViewRowsAddedEventArgs.cs
- WebPart.cs
- EnumMember.cs
- TreeNodeCollection.cs
- AssemblyInfo.cs
- ServiceHostingEnvironmentSection.cs
- CompoundFileDeflateTransform.cs
- InvokeProviderWrapper.cs
- PackageStore.cs
- ManagedIStream.cs
- Point3D.cs
- ImageSourceConverter.cs
- VarRefManager.cs
- SerializationInfo.cs
- RoutedEventArgs.cs
- InvalidWMPVersionException.cs