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
- updatecommandorderer.cs
- Stroke2.cs
- DrawingContextDrawingContextWalker.cs
- SqlMethodAttribute.cs
- CompositionDesigner.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- odbcmetadatafactory.cs
- OdbcStatementHandle.cs
- ToolboxComponentsCreatedEventArgs.cs
- TabletDeviceInfo.cs
- DataGridViewDataConnection.cs
- ExpressionPrinter.cs
- DrawingContextFlattener.cs
- ColumnProvider.cs
- Control.cs
- ToolStripLabel.cs
- ScriptHandlerFactory.cs
- CommandDevice.cs
- FileClassifier.cs
- recordstatescratchpad.cs
- ReferencedAssemblyResolver.cs
- EntitySqlQueryCacheEntry.cs
- As.cs
- cookieexception.cs
- DrawToolTipEventArgs.cs
- ConfigurationValues.cs
- InputLangChangeRequestEvent.cs
- GenericAuthenticationEventArgs.cs
- ThemeDirectoryCompiler.cs
- DataSourceGeneratorException.cs
- StorageMappingFragment.cs
- MemoryPressure.cs
- CacheChildrenQuery.cs
- DashStyle.cs
- Exceptions.cs
- SiteMapHierarchicalDataSourceView.cs
- Panel.cs
- XPathCompiler.cs
- ToolStripSeparatorRenderEventArgs.cs
- TextTreeInsertUndoUnit.cs
- DataGridViewCellValueEventArgs.cs
- Compiler.cs
- StandardTransformFactory.cs
- RemotingException.cs
- GeneratedCodeAttribute.cs
- ModuleBuilderData.cs
- TemplatedWizardStep.cs
- FusionWrap.cs
- UIElementCollection.cs
- ArgumentException.cs
- FormattedTextSymbols.cs
- Stackframe.cs
- ActivityCompletionCallbackWrapper.cs
- ElementUtil.cs
- DeploymentSection.cs
- RegisteredScript.cs
- connectionpool.cs
- ConfigurationManagerInternalFactory.cs
- _PooledStream.cs
- RowToFieldTransformer.cs
- Thumb.cs
- DefaultEventAttribute.cs
- BuildProviderCollection.cs
- TimeEnumHelper.cs
- AgileSafeNativeMemoryHandle.cs
- CssStyleCollection.cs
- Padding.cs
- AuthenticationException.cs
- Converter.cs
- FlowNode.cs
- MdiWindowListStrip.cs
- Vector3DCollectionValueSerializer.cs
- BamlLocalizationDictionary.cs
- ReflectTypeDescriptionProvider.cs
- CellCreator.cs
- Size3DConverter.cs
- SmtpException.cs
- SqlCacheDependencyDatabaseCollection.cs
- SortDescriptionCollection.cs
- ExclusiveHandle.cs
- SqlXmlStorage.cs
- CollectionChange.cs
- Light.cs
- DockAndAnchorLayout.cs
- TextureBrush.cs
- DropShadowEffect.cs
- DynamicObject.cs
- PrimitiveType.cs
- TextBoxBase.cs
- CheckBox.cs
- PropertyContainer.cs
- ValueChangedEventManager.cs
- VisualTarget.cs
- precedingquery.cs
- PlainXmlWriter.cs
- ToolBarOverflowPanel.cs
- OrderedDictionaryStateHelper.cs
- ActivationArguments.cs
- ProgressBarHighlightConverter.cs
- FormsAuthentication.cs