Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- X509RawDataKeyIdentifierClause.cs
- BuilderPropertyEntry.cs
- LocationReference.cs
- FileReader.cs
- InfoCardArgumentException.cs
- CollectionView.cs
- MemberHolder.cs
- DynamicEntity.cs
- ConstraintManager.cs
- BindableTemplateBuilder.cs
- DataContractJsonSerializer.cs
- PointF.cs
- CriticalFinalizerObject.cs
- TypeUsage.cs
- DataList.cs
- ReadOnlyObservableCollection.cs
- EntityContainerRelationshipSet.cs
- ObjectViewQueryResultData.cs
- StylusButtonEventArgs.cs
- DataGridAddNewRow.cs
- CorrelationActionMessageFilter.cs
- HttpRawResponse.cs
- IApplicationTrustManager.cs
- EntityViewContainer.cs
- PrimitiveXmlSerializers.cs
- WebPartEditorOkVerb.cs
- GenericAuthenticationEventArgs.cs
- AbandonedMutexException.cs
- DWriteFactory.cs
- EdmComplexPropertyAttribute.cs
- WinInetCache.cs
- RegexInterpreter.cs
- OleCmdHelper.cs
- NetPeerTcpBindingCollectionElement.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- Buffer.cs
- FixedLineResult.cs
- TdsParserSessionPool.cs
- KeyPullup.cs
- Transactions.cs
- PropagationProtocolsTracing.cs
- PropertyDescriptorGridEntry.cs
- SqlInternalConnectionSmi.cs
- DataControlFieldHeaderCell.cs
- WebPartConnectionsConfigureVerb.cs
- ConvertersCollection.cs
- TripleDESCryptoServiceProvider.cs
- ComplexLine.cs
- OrderedDictionary.cs
- FormatConvertedBitmap.cs
- OleDbErrorCollection.cs
- UserMapPath.cs
- DictionaryGlobals.cs
- ScrollChangedEventArgs.cs
- GetImportedCardRequest.cs
- DefaultWorkflowLoaderService.cs
- EntitySet.cs
- CodeMemberProperty.cs
- UserControl.cs
- UnauthorizedAccessException.cs
- Root.cs
- ComboBoxItem.cs
- FormView.cs
- SyndicationContent.cs
- TrustVersion.cs
- oledbconnectionstring.cs
- SourceElementsCollection.cs
- ItemContainerGenerator.cs
- FactoryMaker.cs
- __ComObject.cs
- XmlHierarchicalEnumerable.cs
- ObjectDataSourceStatusEventArgs.cs
- hresults.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- AbandonedMutexException.cs
- DataTableCollection.cs
- WorkflowIdleElement.cs
- MdbDataFileEditor.cs
- webbrowsersite.cs
- SingleAnimationBase.cs
- DescendantBaseQuery.cs
- HtmlInputRadioButton.cs
- ClipboardProcessor.cs
- shaperfactoryquerycachekey.cs
- ActivityTypeCodeDomSerializer.cs
- TakeQueryOptionExpression.cs
- FixedDSBuilder.cs
- Keyboard.cs
- Msmq.cs
- AtomicFile.cs
- XmlDocumentType.cs
- TextElementCollectionHelper.cs
- SqlException.cs
- PopOutPanel.cs
- BindingContext.cs
- Point4D.cs
- ListViewGroupConverter.cs
- OleDbReferenceCollection.cs
- HelpEvent.cs
- HtmlDocument.cs