Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewToolTip.cs / 2 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DictionaryGlobals.cs
- Binding.cs
- SqlNotificationEventArgs.cs
- StringToken.cs
- PointConverter.cs
- TearOffProxy.cs
- WorkflowFormatterBehavior.cs
- UnsafeNativeMethods.cs
- PackageRelationshipCollection.cs
- BitmapEffect.cs
- FileResponseElement.cs
- SimpleWorkerRequest.cs
- MasterPage.cs
- DataGridViewColumnTypePicker.cs
- XmlDataCollection.cs
- DateTimeFormatInfo.cs
- TrackingServices.cs
- JavascriptCallbackBehaviorAttribute.cs
- ReturnValue.cs
- EllipseGeometry.cs
- LayoutTableCell.cs
- TimerEventSubscription.cs
- Solver.cs
- RealProxy.cs
- XamlTreeBuilder.cs
- RIPEMD160.cs
- IDQuery.cs
- NamedObject.cs
- sqlcontext.cs
- AnnotationComponentManager.cs
- AcceleratedTokenProvider.cs
- CacheChildrenQuery.cs
- ColumnPropertiesGroup.cs
- XmlCharCheckingReader.cs
- FragmentNavigationEventArgs.cs
- ResourceKey.cs
- versioninfo.cs
- SystemWebSectionGroup.cs
- IntellisenseTextBox.designer.cs
- JavaScriptString.cs
- DesignerActionVerbList.cs
- XmlObjectSerializerReadContext.cs
- StoragePropertyMapping.cs
- XPathNodeHelper.cs
- WebDescriptionAttribute.cs
- StreamGeometry.cs
- ProfileSettingsCollection.cs
- EditorZoneDesigner.cs
- BamlBinaryWriter.cs
- WpfPayload.cs
- FaultPropagationRecord.cs
- ReferencedCategoriesDocument.cs
- SynchronizedDispatch.cs
- DocumentViewerBase.cs
- MulticastOption.cs
- StaticFileHandler.cs
- ControlBuilderAttribute.cs
- PageThemeCodeDomTreeGenerator.cs
- FactoryRecord.cs
- ReadOnlyKeyedCollection.cs
- WebPartEditorOkVerb.cs
- TemplateColumn.cs
- BindingManagerDataErrorEventArgs.cs
- ProcessHostFactoryHelper.cs
- ProjectedSlot.cs
- SqlTypeConverter.cs
- SoapSchemaImporter.cs
- ComponentGuaranteesAttribute.cs
- LinkedResourceCollection.cs
- RuntimeConfigLKG.cs
- EditingCoordinator.cs
- CodeRegionDirective.cs
- MailMessageEventArgs.cs
- SqlCacheDependencySection.cs
- BookmarkEventArgs.cs
- CapabilitiesAssignment.cs
- RichTextBoxConstants.cs
- baseshape.cs
- EnumDataContract.cs
- MasterPageBuildProvider.cs
- DataGridRow.cs
- XmlAttributes.cs
- DataExpression.cs
- CharEntityEncoderFallback.cs
- Simplifier.cs
- MessageHeaderT.cs
- CheckBoxFlatAdapter.cs
- ExecutionEngineException.cs
- EventWaitHandleSecurity.cs
- Solver.cs
- ResizingMessageFilter.cs
- InheritanceRules.cs
- messageonlyhwndwrapper.cs
- AuthenticationConfig.cs
- MediaTimeline.cs
- WSFederationHttpBinding.cs
- AnnouncementDispatcherAsyncResult.cs
- LinqDataSourceContextEventArgs.cs
- MimeImporter.cs
- RepeaterItemEventArgs.cs