# GrapeCity.ActiveReports.Viewer.Win.Viewer.Find

## Content

<div class="doc-site-dotnet-api-container">




<h1 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Find" data-uid="GrapeCity.ActiveReports.Viewer.Win.Viewer.Find" class="text-break">Find Event
</h1>
<div class="markdown level0 summary"><p>Occurs when the Find dialog successfully locates the specified text within the document.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.ActiveReports.Viewer.Win.html">GrapeCity.ActiveReports.Viewer.Win</a></h6>
<h6><strong>Assembly</strong>: MESCIUS.ActiveReports.Viewer.Win.dll</h6>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Find_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public event FindEventHandler Find</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="GrapeCity.ActiveReports.Viewer.Win.FindEventHandler.html">FindEventHandler</a></td>
      <td>Occurs when the Find dialog successfully locates the specified text within the document.</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Find_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>The <a class="xref" href="GrapeCity.ActiveReports.Viewer.Win.FindEventArgs.html">FindEventArgs</a> associated with this event provides details about the found text, including its location and the
context in which it was found.</p>
</div>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_Find_examples"><strong>Examples</strong></h5>
<pre><code class="lang-csharp">public partial class MyForm : Form
{
	private Viewer viewer;
	public MyForm()
	{
		InitializeComponent();
		viewer = new Viewer();

		// Subscribe to the Find event
		viewer.Find += Viewer_Find;

		this.Controls.Add(viewer);
		viewer.Dock = DockStyle.Fill;
	}
}
private void Viewer_Find(object sender, FindEventArgs e)
{
	if (e.Found)
		MessageBox.Show($"Text found on page {e.PageIndex + 1}.", "Search", MessageBoxButtons.OK, MessageBoxIcon.Information);
	else
		MessageBox.Show("Text not found.", "Search", MessageBoxButtons.OK, MessageBoxIcon.Information);
}</code></pre>

</div>
