Board index » delphi » Hints and Forms and MouseMove

Hints and Forms and MouseMove

Hi,

I'm trying to change the hint of a form as the mouse moves over it (the
form has a picture on the canvas).  Simply settings the Hint property
does not update the displayed hint (it looks like the hint only changes
when the focus/control is changed).  Neither does toggling
Application.ShowHint.

What I'd like to do is display a "hint" message as the user moves the
mouse over the bitmap.  Using multiple PaintBoxes or Images is out of the
question as the form bitmap changes as user makes selections.

Would using a form-sized Image or PaintBox solve the problem?  Is there a
way to update the hint window?

Thanks ...

---- Rui M. Pereira Work: r...@microforum.com, http://www.microforum.com
Home: r...@geocities.com,
http://www.geocities.com/SiliconValley/Lakes/3611

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

 

Re:Hints and Forms and MouseMove


In article <861892058.6...@dejanews.com>,

Quote
  r...@geocities.com wrote:
> I'm trying to change the hint of a form as the mouse moves over it (the
> form has a picture on the canvas).  Simply settings the Hint property
> does not update the displayed hint (it looks like the hint only changes
> when the focus/control is changed).  Neither does toggling
> Application.ShowHint.
> ---- Rui M. Pereira Work: r...@microforum.com, http://www.microforum.com
> Home: r...@geocities.com,
> http://www.geocities.com/SiliconValley/Lakes/3611

Well, I've found a solution (it was on the help file too! :):

Set TApplication.OnShowHint to a procedure and in the procedure change
the THintInfo.CursorRect info to the size of the region you want the hint
for.  If the cursor goes outside that TRect, then the hint disappears
(and the OnShowHint gets called again if the cursor is still on the
control).

---- Rui M. Pereira Work: r...@microforum.com, http://www.microforum.com
Home: r...@geocities.com,
http://www.geocities.com/SiliconValley/Lakes/3611

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

Other Threads