title: Delphi: How make my own Hint Window?
body: <p>D6 Prof.</p>
  
  <p>We have a special application with a special grid. It have a HintWindow what can show other informations that cannot place in cells. For example long memos.
  When you move the mouse to a cell, it is waiting for 2 sec, and show the informations.</p>
  
  <p>The problem of this theme that HintWindow is not working properly, or in same way that normal "Hints" do.</p>
  
  <p>Normal hints are appearing, and they are disappearing in these cases:
  - the hint showing time ellapsed
  - the the active form is deactivated
  - a new form shown
  - application replaced by another task (ALT + TAB)</p>
  
  <p>But our HintWindow is cannot detect that new form showing, or application changed - it is remaining on the top, while until disapp. time... :-(</p>
  
  <p>Another problem that we used "MouseMove" to detect the mouse changing - to start the Hint.</p>
  
  <p>This event is happens also if the HintWindow disappears. So I need to protect against cyclic show with this code:</p>
  
  <pre><code>procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
  begin
      Caption := INtTOStr(X) + ' ' + IntToStr(Y) + ' ' + IntToStr(GetTickCount);
      // If same coordinate I don't show it again
      if (LX &lt;&gt; X) or (LY &lt;&gt; Y) then begin
          miHint.DoActivateHint(Self, 'Anytext', 2000, 2000);
          LX := X; LY := Y;
      end;
  end;
  </code></pre>
  
  <p>Without this LX, LY the HintWindow cyclically appears and dissappears.</p>
  
  <p>So: we need to know how we make a HintWindow that is working in same method like application "Hint", but limited into this grid.
  It must close on "task change", "form change". How to do it?</p>
  
  <p>THanks for your help:
     dd</p>