# FarPoint.Win.PopupWindowHelperMessageFilter

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="FarPoint_Win_PopupWindowHelperMessageFilter" data-uid="FarPoint.Win.PopupWindowHelperMessageFilter" class="text-break">PopupWindowHelperMessageFilter Class
</h1>
  <div class="markdown level0 summary"><p>A Message Loop filter which detects mouse events while the popup form is shown
and notifies the owning <a class="xref" href="FarPoint.Win.PopupWindowHelper.html">PopupWindowHelper</a> class when a mouse
click outside the popup occurs.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">PopupWindowHelperMessageFilter</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.imessagefilter">IMessageFilter</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="FarPoint.Win.html">FarPoint.Win</a></h6>
  <h6><strong>Assembly</strong>: FarPoint.Win.dll</h6>
  <h5 id="FarPoint_Win_PopupWindowHelperMessageFilter_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class PopupWindowHelperMessageFilter : IMessageFilter</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class PopupWindowHelperMessageFilter
    Implements IMessageFilter</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_PopupWindowHelperMessageFilter__ctor_FarPoint_Win_PopupWindowHelper_System_Windows_Forms_Control_" data-uid="FarPoint.Win.PopupWindowHelperMessageFilter.#ctor(FarPoint.Win.PopupWindowHelper,System.Windows.Forms.Control)">
          <a class="xref" href="FarPoint.Win.PopupWindowHelperMessageFilter.-ctor.html#FarPoint_Win_PopupWindowHelperMessageFilter__ctor_FarPoint_Win_PopupWindowHelper_System_Windows_Forms_Control_">PopupWindowHelperMessageFilter(PopupWindowHelper, Control)</a>
        </td>
        <td class="markdown level1 summary"><p>Constructs a new instance of this class and sets the owning
object.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_PopupWindowHelperMessageFilter_Popup" data-uid="FarPoint.Win.PopupWindowHelperMessageFilter.Popup">
          <a class="xref" href="FarPoint.Win.PopupWindowHelperMessageFilter.Popup.html#FarPoint_Win_PopupWindowHelperMessageFilter_Popup">Popup</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the popup form which is being displayed.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_PopupWindowHelperMessageFilter_OnCancelPopup_FarPoint_Win_PopupCancelEventArgs_" data-uid="FarPoint.Win.PopupWindowHelperMessageFilter.OnCancelPopup(FarPoint.Win.PopupCancelEventArgs)">
          <a class="xref" href="FarPoint.Win.PopupWindowHelperMessageFilter.OnCancelPopup.html#FarPoint_Win_PopupWindowHelperMessageFilter_OnCancelPopup_FarPoint_Win_PopupCancelEventArgs_">OnCancelPopup(PopupCancelEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="FarPoint.Win.PopupWindowHelperMessageFilter.PopupCancel.html">PopupCancel</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Win_PopupWindowHelperMessageFilter_PreFilterMessage_System_Windows_Forms_Message__" data-uid="FarPoint.Win.PopupWindowHelperMessageFilter.PreFilterMessage(System.Windows.Forms.Message@)">
          <a class="xref" href="FarPoint.Win.PopupWindowHelperMessageFilter.PreFilterMessage.html#FarPoint_Win_PopupWindowHelperMessageFilter_PreFilterMessage_System_Windows_Forms_Message__">PreFilterMessage(ref Message)</a>
        </td>
        <td class="markdown level1 summary"><p>Checks the message loop for mouse messages while the popup
window is displayed.  If one is detected the position is
checked to see if it is outside the form, and the owner
is notified if so.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Win_PopupWindowHelperMessageFilter_PopupCancel" data-uid="FarPoint.Win.PopupWindowHelperMessageFilter.PopupCancel">
          <a class="xref" href="FarPoint.Win.PopupWindowHelperMessageFilter.PopupCancel.html">PopupCancel</a>
        </td>
        <td class="markdown level1 summary"><p>Raised when the Popup Window is about to be cancelled.  The
<a class="xref" href="FarPoint.Win.PopupCancelEventArgs.Cancel.html#FarPoint_Win_PopupCancelEventArgs_Cancel">Cancel</a> property can be
set to <code>true</code> to prevent the form from being cancelled.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
