Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 5 / 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
- EntityDesignerBuildProvider.cs
- CorePropertiesFilter.cs
- Light.cs
- ActiveXHost.cs
- DependencyObject.cs
- DeflateEmulationStream.cs
- ConnectionPool.cs
- DBCommand.cs
- ZipIOBlockManager.cs
- ModelItemKeyValuePair.cs
- BamlMapTable.cs
- ListViewItemSelectionChangedEvent.cs
- DataControlFieldCell.cs
- TypePropertyEditor.cs
- ValueUtilsSmi.cs
- AssemblyGen.cs
- ParserStreamGeometryContext.cs
- CombinedGeometry.cs
- BitmapFrameEncode.cs
- FormViewInsertEventArgs.cs
- SectionInput.cs
- DetailsViewInsertEventArgs.cs
- SiteMapDataSourceView.cs
- ObjectStateFormatter.cs
- QueryResults.cs
- MatrixTransform.cs
- BrowserCapabilitiesFactoryBase.cs
- HashCodeCombiner.cs
- DataMemberListEditor.cs
- EncoderReplacementFallback.cs
- BindingExpression.cs
- DockPattern.cs
- InvalidChannelBindingException.cs
- KeysConverter.cs
- TextEncodedRawTextWriter.cs
- RadioButton.cs
- InvalidOperationException.cs
- DataViewSetting.cs
- InvalidCommandTreeException.cs
- PlatformNotSupportedException.cs
- DispatcherTimer.cs
- RegexCode.cs
- RepeatInfo.cs
- CodeBlockBuilder.cs
- ConsumerConnectionPointCollection.cs
- InvalidPipelineStoreException.cs
- DataGridViewAdvancedBorderStyle.cs
- SafeHandles.cs
- XpsSerializationManagerAsync.cs
- SqlClientMetaDataCollectionNames.cs
- CryptoStream.cs
- SqlUserDefinedAggregateAttribute.cs
- InputReportEventArgs.cs
- SqlMethodAttribute.cs
- OneOfConst.cs
- NullableIntMinMaxAggregationOperator.cs
- ListBase.cs
- BlockExpression.cs
- IntegrationExceptionEventArgs.cs
- ClientTargetSection.cs
- NavigatorOutput.cs
- Attribute.cs
- GenericTextProperties.cs
- TableLayoutStyleCollection.cs
- Image.cs
- GlyphRun.cs
- WebRequest.cs
- PeerTransportListenAddressValidator.cs
- HostedElements.cs
- ToolStripSeparator.cs
- RepeatInfo.cs
- Visitors.cs
- MessageSecurityException.cs
- SubqueryTrackingVisitor.cs
- ObjectContext.cs
- AppDomainFactory.cs
- ResolveMatches11.cs
- Utils.cs
- FontNamesConverter.cs
- NamedPipeChannelFactory.cs
- XmlSchemaSimpleContent.cs
- DataControlPagerLinkButton.cs
- RadioButton.cs
- RuntimeConfigLKG.cs
- SafeCryptHandles.cs
- ProtocolViolationException.cs
- EndpointConfigContainer.cs
- HandleTable.cs
- SocketPermission.cs
- _LoggingObject.cs
- QilReplaceVisitor.cs
- ManagementObjectSearcher.cs
- QueryNode.cs
- PageEventArgs.cs
- SHA384.cs
- StringConcat.cs
- DataGridRelationshipRow.cs
- TypeExtensionConverter.cs
- ErrorFormatter.cs
- TextSimpleMarkerProperties.cs