Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 1 / 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
- PropertyValueChangedEvent.cs
- MessageLogTraceRecord.cs
- Encoder.cs
- ExceptionWrapper.cs
- TreeWalkHelper.cs
- Char.cs
- SqlRecordBuffer.cs
- ObjectListGeneralPage.cs
- ObjectDataSourceDisposingEventArgs.cs
- TableAutomationPeer.cs
- ToolboxItem.cs
- SemaphoreSecurity.cs
- ISFTagAndGuidCache.cs
- TextMetrics.cs
- RepeaterItemCollection.cs
- C14NUtil.cs
- UnsafeNativeMethodsMilCoreApi.cs
- Vector3DAnimationUsingKeyFrames.cs
- TrackingCondition.cs
- ListViewGroup.cs
- CodeTypeReferenceExpression.cs
- ClientTarget.cs
- User.cs
- ExtentJoinTreeNode.cs
- _RequestCacheProtocol.cs
- DecoderFallback.cs
- HttpApplicationStateBase.cs
- ColorKeyFrameCollection.cs
- DefaultAsyncDataDispatcher.cs
- XamlToRtfWriter.cs
- SoapRpcServiceAttribute.cs
- AdapterSwitches.cs
- NavigationProperty.cs
- login.cs
- HttpListenerRequest.cs
- UpDownEvent.cs
- tooltip.cs
- ConnectionStringSettings.cs
- TreeNodeCollectionEditor.cs
- SafeArrayTypeMismatchException.cs
- AssemblyAttributesGoHere.cs
- MD5HashHelper.cs
- DataGridLengthConverter.cs
- GridErrorDlg.cs
- FileSystemWatcher.cs
- SourceFilter.cs
- ClonableStack.cs
- BigInt.cs
- TrustLevelCollection.cs
- DataServiceExpressionVisitor.cs
- TrackingValidationObjectDictionary.cs
- RelationshipType.cs
- Double.cs
- XmlByteStreamReader.cs
- SerializationFieldInfo.cs
- LicFileLicenseProvider.cs
- RtfFormatStack.cs
- HierarchicalDataSourceControl.cs
- WindowPattern.cs
- BitmapImage.cs
- ClientProxyGenerator.cs
- QueueSurrogate.cs
- ObjectConverter.cs
- SurrogateEncoder.cs
- ExtensionSimplifierMarkupObject.cs
- URI.cs
- Container.cs
- ActionNotSupportedException.cs
- SortFieldComparer.cs
- UncommonField.cs
- ComAwareEventInfo.cs
- SqlFacetAttribute.cs
- CultureInfo.cs
- CompiledRegexRunnerFactory.cs
- Slider.cs
- SettingsSection.cs
- BaseServiceProvider.cs
- DiscoveryMessageSequence11.cs
- DetailsViewInsertEventArgs.cs
- XmlBufferReader.cs
- StringSource.cs
- baseshape.cs
- CodeGotoStatement.cs
- SmiSettersStream.cs
- ECDsa.cs
- Array.cs
- BasePattern.cs
- PropertyRef.cs
- TypeLoadException.cs
- ConsumerConnectionPointCollection.cs
- DataGridViewCellLinkedList.cs
- BlobPersonalizationState.cs
- WebPartTracker.cs
- ComEventsInfo.cs
- OleDragDropHandler.cs
- DataRelationCollection.cs
- ControlTemplate.cs
- StringFreezingAttribute.cs
- BindingContext.cs
- DemultiplexingClientMessageFormatter.cs