Imports Infragistics.Win.UltraWinSpellChecker Public Class CheckableUserControl Inherits System.Windows.Forms.UserControl 'Implement IProvideTextBox or ISpellCheckTargt to make your 'user control spell checkable Implements IProvideTextBox Friend WithEvents richTextBox1 As System.Windows.Forms.RichTextBox 'Implement the IProvideTextBox.TextBox member ' ''' <summary> ''' Gets the text box in this user control that the spell checker should check. ''' </summary> Public ReadOnly Property TextBox() As TextBoxBase Implements IProvideTextBox.TextBox 'Return the rich text box Get Return Me.richTextBox1 End Get End Property End Class
using System.Windows.Forms; using Infragistics.Win.UltraWinSpellChecker; public class CheckableUserControl : System.Windows.Forms.UserControl, //Implement IProvideTextBox or ISpellCheckTargt to make your //user control spell checkable IProvideTextBox { private System.Windows.Forms.RichTextBox richTextBox1; //Implement the IProvideTextBox.TextBox member // /// <summary> /// Gets the text box in this user control that the spell checker should check. /// </summary> public TextBoxBase TextBox { //Return the rich text box get{ return this.richTextBox1; } } }