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
- CollectionExtensions.cs
- HighlightVisual.cs
- HwndHostAutomationPeer.cs
- RealizationContext.cs
- AnimatedTypeHelpers.cs
- HttpResponse.cs
- UrlAuthFailureHandler.cs
- DictationGrammar.cs
- ListViewItemEventArgs.cs
- CallbackHandler.cs
- ComboBoxHelper.cs
- ExchangeUtilities.cs
- SmiMetaDataProperty.cs
- FloaterParagraph.cs
- TextFormatter.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- PhysicalFontFamily.cs
- graph.cs
- PoisonMessageException.cs
- Pen.cs
- PortCache.cs
- ObjectContextServiceProvider.cs
- EventLogPermissionAttribute.cs
- LogLogRecordEnumerator.cs
- XmlWrappingReader.cs
- ReliableInputConnection.cs
- HotSpot.cs
- KeyGesture.cs
- HelpFileFileNameEditor.cs
- TypeForwardedToAttribute.cs
- sqlpipe.cs
- EncoderParameters.cs
- TimerEventSubscriptionCollection.cs
- validationstate.cs
- OperandQuery.cs
- SmiEventSink.cs
- DocumentPageHost.cs
- KeyEvent.cs
- MessageQueueException.cs
- RealizationDrawingContextWalker.cs
- HwndHost.cs
- EnumValidator.cs
- ViewGenerator.cs
- CollectionMarkupSerializer.cs
- ObjectAnimationUsingKeyFrames.cs
- CodeVariableReferenceExpression.cs
- CodeConstructor.cs
- ConstructorExpr.cs
- HttpRawResponse.cs
- DataContractSerializerServiceBehavior.cs
- ConfigurationErrorsException.cs
- MouseDevice.cs
- LinkedList.cs
- QuestionEventArgs.cs
- ModelItemDictionaryImpl.cs
- GridViewSelectEventArgs.cs
- DesignConnection.cs
- SystemNetworkInterface.cs
- ContextProperty.cs
- OpenTypeLayout.cs
- DataTableCollection.cs
- wgx_exports.cs
- SimplePropertyEntry.cs
- DateTimeStorage.cs
- HWStack.cs
- DbModificationCommandTree.cs
- RealProxy.cs
- DropDownButton.cs
- XPathNavigator.cs
- OdbcDataReader.cs
- Point4D.cs
- MulticastOption.cs
- HttpApplicationFactory.cs
- TypeElement.cs
- ContentIterators.cs
- SharingService.cs
- SchemaElementDecl.cs
- GeneralTransform3D.cs
- ZoneButton.cs
- MouseWheelEventArgs.cs
- XmlSerializationReader.cs
- RowToParametersTransformer.cs
- DefaultAutoFieldGenerator.cs
- Interlocked.cs
- ModulesEntry.cs
- SemaphoreSecurity.cs
- DoubleCollectionConverter.cs
- DataGridViewRowPostPaintEventArgs.cs
- ChangePassword.cs
- HeaderedItemsControl.cs
- DataGridViewTextBoxEditingControl.cs
- SourceFilter.cs
- UnauthorizedAccessException.cs
- wmiutil.cs
- CacheSection.cs
- CompilerCollection.cs
- Vars.cs
- ExtensionSimplifierMarkupObject.cs
- _Win32.cs
- WindowsHyperlink.cs