# C1.Win.Command.C1TopicBar.HitTest

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Command_C1TopicBar_HitTest_" data-uid="C1.Win.Command.C1TopicBar.HitTest*">HitTest Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Command_C1TopicBar_HitTest_" data-uid="C1.Win.Command.C1TopicBar.HitTest*"></a>
<h4 id="C1_Win_Command_C1TopicBar_HitTest" data-uid="C1.Win.Command.C1TopicBar.HitTest">HitTest()</h4>
<div class="markdown level1 summary"><p>Returns information about the control at at the current mouse position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1TopicBarHitTestInfo HitTest()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function HitTest() As C1TopicBarHitTestInfo</code></pre>
</div>
<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="C1.Win.Command.C1TopicBarHitTestInfo.html">C1TopicBarHitTestInfo</a></td>
      <td><p>A <a class="xref" href="C1.Win.Command.C1TopicBarHitTestInfo.html">C1TopicBarHitTestInfo</a> object that contains information about the point.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_Command_C1TopicBar_HitTest_" data-uid="C1.Win.Command.C1TopicBar.HitTest*"></a>
<h4 id="C1_Win_Command_C1TopicBar_HitTest_System_Int32_System_Int32_" data-uid="C1.Win.Command.C1TopicBar.HitTest(System.Int32,System.Int32)">HitTest(int, int)</h4>
<div class="markdown level1 summary"><p>Returns information about the control at a specified point on the control surface.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1TopicBarHitTestInfo HitTest(int x, int y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function HitTest(x As Integer, y As Integer) As C1TopicBarHitTestInfo</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.int32">int</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The horizontal position of the client coordinate.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The vertical position of the client coordinate.</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="C1.Win.Command.C1TopicBarHitTestInfo.html">C1TopicBarHitTestInfo</a></td>
      <td><p>A <a class="xref" href="C1.Win.Command.C1TopicBarHitTestInfo.html">C1TopicBarHitTestInfo</a> object that contains information about the point.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_Command_C1TopicBar_HitTest_System_Int32_System_Int32__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is useful when handling the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control.mousemove">MouseMove</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control.mousedown">MouseDown</a> events or similar.
It allows you to determine whether the mouse is over a specific link, page title, etc.</p>
</div>


<a id="C1_Win_Command_C1TopicBar_HitTest_" data-uid="C1.Win.Command.C1TopicBar.HitTest*"></a>
<h4 id="C1_Win_Command_C1TopicBar_HitTest_System_Drawing_Point_" data-uid="C1.Win.Command.C1TopicBar.HitTest(System.Drawing.Point)">HitTest(Point)</h4>
<div class="markdown level1 summary"><p>Returns information about the control at a specified point on the control surface.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1TopicBarHitTestInfo HitTest(Point p)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function HitTest(p As Point) As C1TopicBarHitTestInfo</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.drawing.point">Point</a></td>
      <td><span class="parametername">p</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.point">Point</a> in client coordinates.</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="C1.Win.Command.C1TopicBarHitTestInfo.html">C1TopicBarHitTestInfo</a></td>
      <td><p>A <a class="xref" href="C1.Win.Command.C1TopicBarHitTestInfo.html">C1TopicBarHitTestInfo</a> object that contains information about the point.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_Command_C1TopicBar_HitTest_System_Drawing_Point__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is useful when handling the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control.mousemove">MouseMove</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control.mousedown">MouseDown</a> events or similar.
It allows you to determine whether the mouse is over a specific link, page title, etc.</p>
</div>
<h5 id="C1_Win_Command_C1TopicBar_HitTest_System_Drawing_Point__examples">Examples</h5>
<p>The code below shows hit test information whenever the user moves the mouse:</p>
<pre><code class="lang-csharp">Private Sub C1TopicBar1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles C1TopicBar1.MouseMove
Dim ht As C1.Win.Command.C1TopicBarHitTestInfo = C1TopicBar1.HitTest(e.Location)
Label1.Text = ht.Type.ToString()
If (Not IsNothing(ht.Page)) Then
   Label2.Text = ht.Page.Text
Else
   Label2.Text = ""
End If
If (Not IsNothing(ht.Link)) Then
   Label3.Text = ht.Link.Text
Else
   Label3.Text = ""
End If
End Sub</code></pre>

</div>
