# C1.Win.SpellChecker.C1SpellChecker.CheckControl

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*">CheckControl Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_C1_Win_SpellChecker_ISpellCheckableEditor_System_Boolean_C1_Win_SpellChecker_ISpellDialog_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(C1.Win.SpellChecker.ISpellCheckableEditor,System.Boolean,C1.Win.SpellChecker.ISpellDialog)">CheckControl(ISpellCheckableEditor, bool, ISpellDialog)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for an editor and returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(ISpellCheckableEditor editor, bool fromCursor, ISpellDialog dlg)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(editor As ISpellCheckableEditor, fromCursor As Boolean, dlg As ISpellDialog) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.SpellChecker.ISpellCheckableEditor.html">ISpellCheckableEditor</a></td>
      <td><span class="parametername">editor</span></td>
      <td><p><a class="xref" href="C1.Win.SpellChecker.ISpellCheckableEditor.html">ISpellCheckableEditor</a> that contains the text to be spell-checked.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">fromCursor</span></td>
      <td><p>Whether to check only from the cursor position or the entire control contents.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.SpellChecker.ISpellDialog.html">ISpellDialog</a></td>
      <td><span class="parametername">dlg</span></td>
      <td><p>Dialog that implements the <a class="xref" href="C1.Win.SpellChecker.ISpellDialog.html">ISpellDialog</a> interface used for displaying and correcting errors.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, or -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_C1_Win_SpellChecker_ISpellCheckableEditor_System_Boolean_C1_Win_SpellChecker_ISpellDialog__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>For an example, see the <a class="xref" href="C1.Win.SpellChecker.C1SpellChecker.CheckControl.html#C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_TextBoxBase_System_Boolean_C1_Win_SpellChecker_ISpellDialog_">CheckControl(TextBoxBase, bool, ISpellDialog)</a> method.</p>
</div>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_C1_Win_SpellChecker_ISpellCheckableEditor_System_Boolean_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(C1.Win.SpellChecker.ISpellCheckableEditor,System.Boolean)">CheckControl(ISpellCheckableEditor, bool)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for an editor and returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(ISpellCheckableEditor editor, bool fromCursor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(editor As ISpellCheckableEditor, fromCursor As Boolean) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.SpellChecker.ISpellCheckableEditor.html">ISpellCheckableEditor</a></td>
      <td><span class="parametername">editor</span></td>
      <td><p><a class="xref" href="C1.Win.SpellChecker.ISpellCheckableEditor.html">ISpellCheckableEditor</a> that contains the text to be spell-checked.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">fromCursor</span></td>
      <td><p>Whether to check only from the cursor position or the entire control contents.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, or -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_C1_Win_SpellChecker_ISpellCheckableEditor_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>For an example, see the <a class="xref" href="C1.Win.SpellChecker.C1SpellChecker.CheckControl.html#C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_TextBoxBase_System_Boolean_C1_Win_SpellChecker_ISpellDialog_">CheckControl(TextBoxBase, bool, ISpellDialog)</a> method.</p>
</div>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_C1_Win_SpellChecker_ISpellCheckableEditor_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(C1.Win.SpellChecker.ISpellCheckableEditor)">CheckControl(ISpellCheckableEditor)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for an editor and returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(ISpellCheckableEditor editor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(editor As ISpellCheckableEditor) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.SpellChecker.ISpellCheckableEditor.html">ISpellCheckableEditor</a></td>
      <td><span class="parametername">editor</span></td>
      <td><p><a class="xref" href="C1.Win.SpellChecker.ISpellCheckableEditor.html">ISpellCheckableEditor</a> that contains the text to be spell-checked.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, or -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_TextBoxBase_System_Boolean_C1_Win_SpellChecker_ISpellDialog_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(System.Windows.Forms.TextBoxBase,System.Boolean,C1.Win.SpellChecker.ISpellDialog)">CheckControl(TextBoxBase, bool, ISpellDialog)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for an editor, returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(TextBoxBase editor, bool fromCursor, ISpellDialog dlg)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(editor As TextBoxBase, fromCursor As Boolean, dlg As ISpellDialog) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.textboxbase">TextBoxBase</a></td>
      <td><span class="parametername">editor</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.textboxbase">TextBoxBase</a> control that contains the text to be spell-checked.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">fromCursor</span></td>
      <td><p>Whether to check only from the cursor position or the entire control contents.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.SpellChecker.ISpellDialog.html">ISpellDialog</a></td>
      <td><span class="parametername">dlg</span></td>
      <td><p>Dialog that implements the <a class="xref" href="C1.Win.SpellChecker.ISpellDialog.html">ISpellDialog</a> interface used for displaying and correcting errors.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_TextBoxBase_System_Boolean_C1_Win_SpellChecker_ISpellDialog__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can use this method to invoke the spell-checker using a custom spell dialog, or using the
built-in <a class="xref" href="C1.Win.SpellChecker.C1SpellDialog.html">C1SpellDialog</a>.</p>
</div>
<h5 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_TextBoxBase_System_Boolean_C1_Win_SpellChecker_ISpellDialog__examples">Examples</h5>
<p>The code below uses the <b>CheckControl</b> method with an instance of the <a class="xref" href="C1.Win.SpellChecker.C1SpellDialog.html">C1SpellDialog</a>
and attaches some event handlers to display the spell-checking progress in a status bar.</p>
<pre><code class="lang-csharp">private void btnSpell_Click(object sender, EventArgs e)
{
  // create spell-checking dialog
  using (C1SpellDialog dlg = new C1SpellDialog())
  {
    // connect event handler
    dlg.ErrorDisplayed += new EventHandler(dlg_ErrorDisplayed);

    // spell-check the 'textBox' control
    c1SpellChecker1.CheckControl(this.textBox, false, dlg);
  }
}
void dlg_ErrorDisplayed(object sender, EventArgs e)
{
  // get the C1SpellDialog that fired the event
  C1SpellDialog dlg = sender as C1SpellDialog;

  // show information about the error currently displayed
  statusLabel1.Text = string.Format("Error {0} of {1}: '{2}'",
    dlg.ErrorIndex + 1, dlg.ErrorCount, dlg.CurrentError.Text);
}</code></pre>



<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_TextBoxBase_System_Boolean_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(System.Windows.Forms.TextBoxBase,System.Boolean)">CheckControl(TextBoxBase, bool)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for an editor, returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(TextBoxBase editor, bool fromCursor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(editor As TextBoxBase, fromCursor As Boolean) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.textboxbase">TextBoxBase</a></td>
      <td><span class="parametername">editor</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.textboxbase">TextBoxBase</a> control that contains the text to be spell-checked.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">fromCursor</span></td>
      <td><p>Whether to check only from the cursor position or the entire control contents.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_TextBoxBase_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(System.Windows.Forms.TextBoxBase)">CheckControl(TextBoxBase)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for an editor, returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(TextBoxBase editor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(editor As TextBoxBase) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.textboxbase">TextBoxBase</a></td>
      <td><span class="parametername">editor</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.textboxbase">TextBoxBase</a> control that contains the text to be spell-checked.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_WebBrowser_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(System.Windows.Forms.WebBrowser)">CheckControl(WebBrowser)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for a browser, returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(WebBrowser browser)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(browser As WebBrowser) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.webbrowser">WebBrowser</a></td>
      <td><span class="parametername">browser</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.webbrowser">WebBrowser</a> control that contains the text to be spell-checked.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_WebBrowser_System_Boolean_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(System.Windows.Forms.WebBrowser,System.Boolean)">CheckControl(WebBrowser, bool)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for a browser, returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(WebBrowser browser, bool fromCursor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(browser As WebBrowser, fromCursor As Boolean) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.webbrowser">WebBrowser</a></td>
      <td><span class="parametername">browser</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.webbrowser">WebBrowser</a> control that contains the text to be spell-checked.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">fromCursor</span></td>
      <td><p>Whether to check only from the cursor position or the entire control contents.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_WebBrowser_System_Boolean_C1_Win_SpellChecker_ISpellDialog_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(System.Windows.Forms.WebBrowser,System.Boolean,C1.Win.SpellChecker.ISpellDialog)">CheckControl(WebBrowser, bool, ISpellDialog)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for a browser, returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(WebBrowser browser, bool fromCursor, ISpellDialog dlg)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(browser As WebBrowser, fromCursor As Boolean, dlg As ISpellDialog) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.webbrowser">WebBrowser</a></td>
      <td><span class="parametername">browser</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.webbrowser">WebBrowser</a> control that contains the text to be spell-checked.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">fromCursor</span></td>
      <td><p>Whether to check only from the cursor position or the entire control contents.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.SpellChecker.ISpellDialog.html">ISpellDialog</a></td>
      <td><span class="parametername">dlg</span></td>
      <td><p>Dialog that implements the <a class="xref" href="C1.Win.SpellChecker.ISpellDialog.html">ISpellDialog</a> interface used for displaying and correcting errors.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_Control_System_Object_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(System.Windows.Forms.Control,System.Object)">CheckControl(Control, object)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for a control which supports the <b>IHtmlDocument2</b> interface,
returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(Control control, object browser)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(control As Control, browser As Object) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a></td>
      <td><span class="parametername">control</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a> control that is used as a parent to show a spell checking dialog.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">browser</span></td>
      <td><p>Reference to an <b>IWebBrowser2</b> interface.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_Control_System_Object_System_Boolean_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(System.Windows.Forms.Control,System.Object,System.Boolean)">CheckControl(Control, object, bool)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for a control which supports the <b>IHtmlDocument2</b> interface,
returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(Control control, object browser, bool fromCursor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(control As Control, browser As Object, fromCursor As Boolean) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a></td>
      <td><span class="parametername">control</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a> control that is used as a parent to show a spell checking dialog.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">browser</span></td>
      <td><p>Reference to an <b>IWebBrowser2</b> interface.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">fromCursor</span></td>
      <td><p>Whether to check only from the cursor position or the entire control contents.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl*"></a>
<h4 id="C1_Win_SpellChecker_C1SpellChecker_CheckControl_System_Windows_Forms_Control_System_Object_System_Boolean_C1_Win_SpellChecker_ISpellDialog_" data-uid="C1.Win.SpellChecker.C1SpellChecker.CheckControl(System.Windows.Forms.Control,System.Object,System.Boolean,C1.Win.SpellChecker.ISpellDialog)">CheckControl(Control, object, bool, ISpellDialog)</h4>
<div class="markdown level1 summary"><p>Shows a spell-checking dialog for a control which supports the <b>IHtmlDocument2</b> interface,
returns the number of spelling errors found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CheckControl(Control control, object browser, bool fromCursor, ISpellDialog dlg)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CheckControl(control As Control, browser As Object, fromCursor As Boolean, dlg As ISpellDialog) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a></td>
      <td><span class="parametername">control</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a> control that is used as a parent to show a spell checking dialog.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">browser</span></td>
      <td><p>Reference to an <b>IWebBrowser2</b> interface.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">fromCursor</span></td>
      <td><p>Whether to check only from the cursor position or the entire control contents.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.SpellChecker.ISpellDialog.html">ISpellDialog</a></td>
      <td><span class="parametername">dlg</span></td>
      <td><p>Dialog that implements the <a class="xref" href="C1.Win.SpellChecker.ISpellDialog.html">ISpellDialog</a> interface used for displaying and correcting errors.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The number of errors found, -1 if the dialog was canceled.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
