Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1029543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:33:37+00:00 2026-05-16T12:33:37+00:00

D6 Prof. We have a special application with a special grid. It have a

  • 0

D6 Prof.

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.

The problem of this theme that HintWindow is not working properly, or in same way that normal “Hints” do.

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)

But our HintWindow is cannot detect that new form showing, or application changed – it is remaining on the top, while until disapp. time… 🙁

Another problem that we used “MouseMove” to detect the mouse changing – to start the Hint.

This event is happens also if the HintWindow disappears. So I need to protect against cyclic show with this 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 <> X) or (LY <> Y) then begin
        miHint.DoActivateHint(Self, 'Anytext', 2000, 2000);
        LX := X; LY := Y;
    end;
end;

Without this LX, LY the HintWindow cyclically appears and dissappears.

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?

THanks for your help:
dd

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:33:38+00:00Added an answer on May 16, 2026 at 12:33 pm

    You’d better use the provided mechanism that show hints throughout the application, by replacing the HintWindowClass of the HintInfo parameter passed to the Application’s OnShowHint event whenever you need to show a customized hint. Maybe you might find some useful implementation details below.

    Old Answer:
    In one older application I had a different hint class for list boxes and grids. The behavior is a bit scattered but basically it boiled down to;

    All DBGrids in the Application is assigned some identifying hint, like: ‘MyDBGridHint’. Application’s OnShowHint event tests if passed ‘HintInfo’s ‘HintControl’ is a ‘TCustomDBGrid’, and if so calls a procedure passing the ‘HintInfo’.

    This procedure finds the cell the hint should be on by using Grid’s MouseCoord method with HintInfo.CursorPos, gets the display text of the cell by temporarily changing Grid’s DataLink. The procedure then creates a TCanvas and assigns its Handle a DC retrieved for the Grid, assigns the font of the grid to the Canvas and tests to see if the grid cell’s boundary is sufficient to display the text. If it decides that the hint will be shown, assigns the cell text to HintInfo.HintStr and a derived hint window class to HintInfo.HintWindowClass, calculates the position, boundary, sets the font etc.. and returns.

    Then OnShowHint event tests to see if HintStr is still the grid hint identifier (I have a comment in the code with “Owned controls by grids produce this.”), and if so cancels the hint.

    I’m not sure if trying to describe it like this can be of any help, but here is trying…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the latest nightly build, VS2008 prof trial and .NET 3.5 and I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.