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
- LinkArea.cs
- manifestimages.cs
- ScriptManagerProxy.cs
- ApplicationServiceManager.cs
- TTSEngineProxy.cs
- ToolStripCollectionEditor.cs
- TableRow.cs
- CodeRegionDirective.cs
- XmlSchemaSequence.cs
- WebCategoryAttribute.cs
- SchemaNamespaceManager.cs
- COM2FontConverter.cs
- XmlValidatingReaderImpl.cs
- LocalizationComments.cs
- RegexBoyerMoore.cs
- _SafeNetHandles.cs
- QueryReaderSettings.cs
- Drawing.cs
- IdentityManager.cs
- UnderstoodHeaders.cs
- HideDisabledControlAdapter.cs
- HttpWebRequestElement.cs
- CodeDomConfigurationHandler.cs
- OleStrCAMarshaler.cs
- RelationshipConstraintValidator.cs
- If.cs
- EndpointReference.cs
- TCPListener.cs
- EntryPointNotFoundException.cs
- ScrollBar.cs
- BinaryObjectInfo.cs
- BindingCollection.cs
- CalendarAutoFormat.cs
- WebPartHelpVerb.cs
- Visual3DCollection.cs
- RewritingSimplifier.cs
- XmlParserContext.cs
- ColorDialog.cs
- MenuBindingsEditorForm.cs
- MobileControlPersister.cs
- ContentPlaceHolder.cs
- TypeConverterBase.cs
- FileUtil.cs
- _Win32.cs
- ConvertersCollection.cs
- BitmapEffectOutputConnector.cs
- MoveSizeWinEventHandler.cs
- User.cs
- ConvertersCollection.cs
- _LocalDataStoreMgr.cs
- ThreadSafeList.cs
- Path.cs
- BrushMappingModeValidation.cs
- InboundActivityHelper.cs
- xml.cs
- OletxVolatileEnlistment.cs
- HttpAsyncResult.cs
- HandlerElement.cs
- DelegatingMessage.cs
- GridViewColumnHeaderAutomationPeer.cs
- DateTimeOffset.cs
- HandledEventArgs.cs
- TransmissionStrategy.cs
- FontCollection.cs
- LinkArea.cs
- Int16Converter.cs
- WebColorConverter.cs
- ObjectSet.cs
- XhtmlTextWriter.cs
- PasswordBox.cs
- TextStore.cs
- AxisAngleRotation3D.cs
- ConfigurationStrings.cs
- ExceptionUtility.cs
- IDispatchConstantAttribute.cs
- QilGenerator.cs
- HttpListenerException.cs
- FunctionQuery.cs
- ClusterSafeNativeMethods.cs
- QfeChecker.cs
- SqlBooleanizer.cs
- SynchronizationLockException.cs
- Button.cs
- wmiprovider.cs
- NavigationProgressEventArgs.cs
- HTTPNotFoundHandler.cs
- COAUTHINFO.cs
- SqlCacheDependency.cs
- Switch.cs
- InvalidProgramException.cs
- IdentityHolder.cs
- Command.cs
- SqlDataSourceAdvancedOptionsForm.cs
- NeutralResourcesLanguageAttribute.cs
- DropShadowEffect.cs
- CommandTreeTypeHelper.cs
- TextTreeUndoUnit.cs
- Misc.cs
- WebPartConnectionsConfigureVerb.cs
- HttpModuleAction.cs