title: How do I define an area and check if the mouse is in it?
body: <p>I am trying to define an area in the shape of a triangle and check if the mouse is in it. I can find if the mouse is in a certain square area using the code below. My program needs to detect the mouse in a triangle or a more complex shape.</p>
  <pre class="lang-pascal prettyprint-override"><code>if (Mouse.CursorPos.X &lt; 20) or (50 &gt; tbmn.Left + tbmn.Width) or (Mouse.CursorPos.Y &lt; 20) or (Mouse.CursorPos.Y &gt; tbmn.Top + 60) then 
  begin
  
  end;
  </code></pre>
  <p>So basically, what I want to do is have a shape anywhere on the screen and check if the mouse is in it.</p>
  <p>Is there a way to easily calculate a region of the screen and detect if the mouse is present in it?</p>