Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ItemTypeToolStripMenuItem.cs
- DesignDataSource.cs
- ToolStripSplitButton.cs
- LineMetrics.cs
- TypeDependencyAttribute.cs
- Size3D.cs
- FixedPosition.cs
- HotCommands.cs
- SmtpDigestAuthenticationModule.cs
- QueryResponse.cs
- WebExceptionStatus.cs
- _WinHttpWebProxyDataBuilder.cs
- WindowsImpersonationContext.cs
- StyleModeStack.cs
- PersonalizationProviderHelper.cs
- WebPartConnectionsCancelEventArgs.cs
- CodeExporter.cs
- Icon.cs
- CopyOnWriteList.cs
- NativeMethods.cs
- InternalsVisibleToAttribute.cs
- AssociationSetMetadata.cs
- MediaTimeline.cs
- ImmutableCollection.cs
- OleDbRowUpdatedEvent.cs
- DefaultValueAttribute.cs
- XmlSchemaExporter.cs
- TextEditorContextMenu.cs
- PriorityBindingExpression.cs
- ContainerVisual.cs
- UTF7Encoding.cs
- StylusCollection.cs
- StringConverter.cs
- InternalSafeNativeMethods.cs
- XPathParser.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- DataGridCaption.cs
- ConfigurationManager.cs
- updatecommandorderer.cs
- ManagementPath.cs
- ScalarConstant.cs
- NamespaceListProperty.cs
- UnsafeNativeMethods.cs
- SoapHttpTransportImporter.cs
- XmlTextReaderImpl.cs
- WindowsComboBox.cs
- CellConstant.cs
- MergeFilterQuery.cs
- MetadataFile.cs
- IPEndPoint.cs
- IsolatedStorageSecurityState.cs
- XmlNamespaceManager.cs
- ChannelOptions.cs
- WindowExtensionMethods.cs
- ContextMenuAutomationPeer.cs
- TemplateField.cs
- InvalidProgramException.cs
- MethodAccessException.cs
- HwndHostAutomationPeer.cs
- NetStream.cs
- GridViewAutomationPeer.cs
- SqlDataSourceSelectingEventArgs.cs
- ColorMap.cs
- SafePointer.cs
- EncodingInfo.cs
- Thread.cs
- RegexBoyerMoore.cs
- ServerValidateEventArgs.cs
- PeerObject.cs
- ToolboxItemSnapLineBehavior.cs
- TreeNode.cs
- Lazy.cs
- ZipFileInfoCollection.cs
- FontFamily.cs
- Point3DCollection.cs
- EmbossBitmapEffect.cs
- ThemeableAttribute.cs
- MdImport.cs
- TransformedBitmap.cs
- EdmToObjectNamespaceMap.cs
- CodeMemberMethod.cs
- ConfigXmlReader.cs
- TwoPhaseCommit.cs
- RequestBringIntoViewEventArgs.cs
- NonSerializedAttribute.cs
- Header.cs
- ProfileParameter.cs
- TraceHwndHost.cs
- DBParameter.cs
- PerfCounterSection.cs
- AssemblyHelper.cs
- DebugTraceHelper.cs
- Events.cs
- QilPatternFactory.cs
- WindowPatternIdentifiers.cs
- precedingsibling.cs
- FacetEnabledSchemaElement.cs
- mediaeventshelper.cs
- FamilyMapCollection.cs
- ClientType.cs