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
- NavigationProperty.cs
- StrongNameUtility.cs
- FtpRequestCacheValidator.cs
- WebPartDisplayMode.cs
- WebControl.cs
- HexParser.cs
- DelegateBodyWriter.cs
- DragDeltaEventArgs.cs
- FormatterConverter.cs
- SurrogateDataContract.cs
- ActivityExecutionContext.cs
- ApplicationBuildProvider.cs
- CodePropertyReferenceExpression.cs
- TransactionScope.cs
- SqlVisitor.cs
- ScriptControlManager.cs
- XmlSchemaImport.cs
- ToolStripPanelRenderEventArgs.cs
- MailAddress.cs
- CallSiteOps.cs
- XmlAttributes.cs
- _HTTPDateParse.cs
- FieldAccessException.cs
- NetworkInformationPermission.cs
- WebHttpSecurityElement.cs
- Label.cs
- ListMarkerSourceInfo.cs
- WindowsPen.cs
- Int64Storage.cs
- TemplatePartAttribute.cs
- DesignTimeParseData.cs
- ElementMarkupObject.cs
- DataGridRow.cs
- UnsafeNativeMethods.cs
- IsolatedStorageException.cs
- EventTrigger.cs
- X509Certificate2.cs
- InputMethodStateTypeInfo.cs
- StdRegProviderWrapper.cs
- TemplateControlBuildProvider.cs
- UIntPtr.cs
- TransformedBitmap.cs
- PreDigestedSignedInfo.cs
- XmlSchemaSimpleTypeList.cs
- AQNBuilder.cs
- DataGridViewUtilities.cs
- PartialList.cs
- EntityContainer.cs
- BindableAttribute.cs
- EntityUtil.cs
- CreateUserWizard.cs
- MetadataSerializer.cs
- SqlConnectionManager.cs
- DecodeHelper.cs
- ValidatorUtils.cs
- WindowsTooltip.cs
- RandomNumberGenerator.cs
- CollectionsUtil.cs
- InputReferenceExpression.cs
- HttpSysSettings.cs
- BitmapEffectState.cs
- HttpCacheVaryByContentEncodings.cs
- IPAddress.cs
- DivideByZeroException.cs
- OdbcDataReader.cs
- LockCookie.cs
- BaseCollection.cs
- PrinterUnitConvert.cs
- RelationshipDetailsRow.cs
- PointLightBase.cs
- ScrollItemProviderWrapper.cs
- ToolStrip.cs
- ParseNumbers.cs
- ListViewInsertionMark.cs
- Section.cs
- QilReplaceVisitor.cs
- XpsSerializationException.cs
- MemoryRecordBuffer.cs
- DuplexSecurityProtocolFactory.cs
- Size3DConverter.cs
- MemoryPressure.cs
- Switch.cs
- WebUtil.cs
- HttpCapabilitiesBase.cs
- Token.cs
- embossbitmapeffect.cs
- TextChange.cs
- WebHttpSecurityModeHelper.cs
- MenuAdapter.cs
- StaticExtensionConverter.cs
- VariableAction.cs
- OpacityConverter.cs
- QuaternionAnimationBase.cs
- AudioBase.cs
- StorageModelBuildProvider.cs
- PrintPageEvent.cs
- DesignerOptionService.cs
- GeneralTransform.cs
- CodeAssignStatement.cs
- SqlDataSourceEnumerator.cs