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
- TransformValueSerializer.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- TagMapCollection.cs
- DataTablePropertyDescriptor.cs
- DateTimeHelper.cs
- MetadataProperty.cs
- HttpRuntime.cs
- XslNumber.cs
- VScrollBar.cs
- DetailsViewRow.cs
- PowerStatus.cs
- ProxySimple.cs
- GraphicsContainer.cs
- ReferencedCollectionType.cs
- RuntimeHelpers.cs
- Logging.cs
- DescendentsWalkerBase.cs
- EntityCommandCompilationException.cs
- ZipIOFileItemStream.cs
- Stacktrace.cs
- IndexedWhereQueryOperator.cs
- TreeNodeEventArgs.cs
- StoragePropertyMapping.cs
- SystemNetworkInterface.cs
- RbTree.cs
- XmlHierarchicalEnumerable.cs
- RawMouseInputReport.cs
- EventSetterHandlerConverter.cs
- GridViewRow.cs
- ActiveDesignSurfaceEvent.cs
- HtmlEncodedRawTextWriter.cs
- HttpCookie.cs
- DataObjectSettingDataEventArgs.cs
- WebPartDeleteVerb.cs
- WhitespaceRule.cs
- CompiledELinqQueryState.cs
- InvalidateEvent.cs
- CreateUserWizard.cs
- CultureTableRecord.cs
- Math.cs
- TypeElement.cs
- CellTreeNode.cs
- Point4D.cs
- SqlTrackingWorkflowInstance.cs
- KnownTypesProvider.cs
- XsdBuildProvider.cs
- MissingManifestResourceException.cs
- RangeValidator.cs
- WebPartUserCapability.cs
- IntegerFacetDescriptionElement.cs
- ItemChangedEventArgs.cs
- CssStyleCollection.cs
- MenuCommandService.cs
- ShutDownListener.cs
- UnsafeMethods.cs
- IconBitmapDecoder.cs
- CallbackCorrelationInitializer.cs
- FormsAuthenticationUser.cs
- XMLSyntaxException.cs
- XmlSchemaComplexContentExtension.cs
- PenContext.cs
- DataRecordInternal.cs
- UpdatePanelTrigger.cs
- ExceptionDetail.cs
- FormatSettings.cs
- ProtocolsConfigurationEntry.cs
- BindingOperations.cs
- WebServiceFaultDesigner.cs
- ImageListUtils.cs
- MemberNameValidator.cs
- SevenBitStream.cs
- HiddenFieldPageStatePersister.cs
- ThreadPool.cs
- ProgressChangedEventArgs.cs
- WmlObjectListAdapter.cs
- KeyProperty.cs
- SessionStateUtil.cs
- CompilerCollection.cs
- DebugView.cs
- Evidence.cs
- CriticalFinalizerObject.cs
- Msmq4PoisonHandler.cs
- EncoderNLS.cs
- HttpPostLocalhostServerProtocol.cs
- XmlArrayItemAttribute.cs
- SqlComparer.cs
- WriteLine.cs
- ImportStoreException.cs
- PointLight.cs
- XmlDomTextWriter.cs
- X509Utils.cs
- Attribute.cs
- WaveHeader.cs
- SystemParameters.cs
- CustomErrorCollection.cs
- XslAstAnalyzer.cs
- RichTextBox.cs
- MenuEventArgs.cs
- Button.cs
- ConfigurationValidatorBase.cs