Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FormViewCommandEventArgs.cs
- MDIClient.cs
- ProfileService.cs
- StringUtil.cs
- ConfigXmlElement.cs
- Vector3DAnimation.cs
- RijndaelCryptoServiceProvider.cs
- MDIWindowDialog.cs
- AlternateView.cs
- ReadOnlyDataSource.cs
- FastPropertyAccessor.cs
- TreeViewEvent.cs
- MulticastNotSupportedException.cs
- IndicCharClassifier.cs
- ObjectViewQueryResultData.cs
- BasicHttpSecurityMode.cs
- PublisherMembershipCondition.cs
- UIElement.cs
- UnsafePeerToPeerMethods.cs
- Matrix3D.cs
- WebPartConnectionCollection.cs
- ControlParameter.cs
- HttpServerUtilityBase.cs
- AdapterUtil.cs
- RunClient.cs
- XappLauncher.cs
- AsyncInvokeContext.cs
- MemberAccessException.cs
- RegexWriter.cs
- Grid.cs
- PointF.cs
- BitSet.cs
- TypedCompletedAsyncResult.cs
- DrawingGroup.cs
- SchemaCollectionCompiler.cs
- SimpleLine.cs
- ResourceContainer.cs
- CryptoHandle.cs
- PagePropertiesChangingEventArgs.cs
- ArraySortHelper.cs
- xmlfixedPageInfo.cs
- xmlsaver.cs
- RoleManagerModule.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- CompletionProxy.cs
- PersonalizationAdministration.cs
- DescendentsWalker.cs
- ColumnHeader.cs
- CommonDialog.cs
- RequestCacheManager.cs
- QuadraticBezierSegment.cs
- StreamGeometry.cs
- _HeaderInfoTable.cs
- StorageSetMapping.cs
- FacetChecker.cs
- MappedMetaModel.cs
- ArcSegment.cs
- LinkUtilities.cs
- OperationPickerDialog.cs
- WorkflowQueueInfo.cs
- PageThemeCodeDomTreeGenerator.cs
- XmlSchemaGroup.cs
- DocumentOrderQuery.cs
- EditingCommands.cs
- FontUnitConverter.cs
- IPipelineRuntime.cs
- EncryptedReference.cs
- SupportingTokenSecurityTokenResolver.cs
- Gdiplus.cs
- ItemType.cs
- ItemCheckEvent.cs
- IUnknownConstantAttribute.cs
- VectorValueSerializer.cs
- MailSettingsSection.cs
- LinkButton.cs
- UdpContractFilterBehavior.cs
- PageVisual.cs
- AssemblyAttributes.cs
- validation.cs
- ComboBox.cs
- TemplateInstanceAttribute.cs
- ExpressionPrefixAttribute.cs
- ViewgenContext.cs
- BeginSelectCardRequest.cs
- CloseCollectionAsyncResult.cs
- streamingZipPartStream.cs
- CustomBinding.cs
- SurrogateEncoder.cs
- ReadOnlyDictionary.cs
- DecoratedNameAttribute.cs
- EntityDataSourceColumn.cs
- GridViewSelectEventArgs.cs
- DataObject.cs
- storepermissionattribute.cs
- VisualStyleElement.cs
- DynamicRenderer.cs
- RoutedEventConverter.cs
- DbReferenceCollection.cs
- OciLobLocator.cs
- AssociationTypeEmitter.cs