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
- MemberInitExpression.cs
- DelegatingConfigHost.cs
- PreviewKeyDownEventArgs.cs
- XmlSchemaComplexContentRestriction.cs
- UnmanagedMemoryStream.cs
- RoutedEventValueSerializer.cs
- MutexSecurity.cs
- WarningException.cs
- EndpointAddressMessageFilter.cs
- ModelPropertyCollectionImpl.cs
- ProjectionCamera.cs
- WebPartConnectionsCloseVerb.cs
- OracleBinary.cs
- ProfileEventArgs.cs
- COM2PropertyPageUITypeConverter.cs
- PerspectiveCamera.cs
- TakeQueryOptionExpression.cs
- DataGridViewCellCollection.cs
- EventListener.cs
- RefType.cs
- SqlRetyper.cs
- SoapCodeExporter.cs
- SettingsPropertyWrongTypeException.cs
- SignatureHelper.cs
- GradientStop.cs
- relpropertyhelper.cs
- DesignerTransaction.cs
- PictureBox.cs
- Point3DKeyFrameCollection.cs
- OutputCacheSettingsSection.cs
- TempFiles.cs
- ToolStripItemRenderEventArgs.cs
- ListItemCollection.cs
- _BasicClient.cs
- RecognizeCompletedEventArgs.cs
- NetMsmqSecurityMode.cs
- DbMetaDataCollectionNames.cs
- UxThemeWrapper.cs
- CellLabel.cs
- Message.cs
- EmptyEnumerable.cs
- TemplatedAdorner.cs
- CompilationPass2Task.cs
- GlobalId.cs
- TemporaryBitmapFile.cs
- SecuritySessionClientSettings.cs
- DragCompletedEventArgs.cs
- SoapTypeAttribute.cs
- PartialTrustVisibleAssemblyCollection.cs
- TargetConverter.cs
- Triplet.cs
- SecurityUtils.cs
- ConfigurationException.cs
- SoapHelper.cs
- LoginDesigner.cs
- StrokeCollection.cs
- userdatakeys.cs
- SystemIPInterfaceProperties.cs
- TimeSpanConverter.cs
- ServerProtocol.cs
- TimeSpan.cs
- ViewCellSlot.cs
- EngineSiteSapi.cs
- DelimitedListTraceListener.cs
- SqlMethods.cs
- WebCategoryAttribute.cs
- SaveFileDialog.cs
- ItemContainerGenerator.cs
- DescendantQuery.cs
- objectquery_tresulttype.cs
- StrokeDescriptor.cs
- Group.cs
- Receive.cs
- DictionaryItemsCollection.cs
- DefaultParameterValueAttribute.cs
- CollectionViewSource.cs
- HostProtectionPermission.cs
- ConnectionManagementElement.cs
- AdapterUtil.cs
- NativeMethods.cs
- DBSchemaRow.cs
- ViewCellSlot.cs
- DetailsViewUpdatedEventArgs.cs
- Int32CollectionConverter.cs
- DataListItem.cs
- WebUtility.cs
- UnlockCardRequest.cs
- PropertyTab.cs
- DeclaredTypeElement.cs
- PrintControllerWithStatusDialog.cs
- UnsafeNetInfoNativeMethods.cs
- PropertyNames.cs
- ContentType.cs
- _ConnectStream.cs
- DateTimeParse.cs
- PropertyItemInternal.cs
- SchemaName.cs
- NonClientArea.cs
- DependencyPropertyHelper.cs
- GeneralTransformGroup.cs