Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Making hints show longer

Posted on 1998-04-29
4
Medium Priority
?
212 Views
Last Modified: 2010-04-06
Hi,
I need to display the hints in my program for longer than
they do now. I need them to show for 6 seconds.
What do i need to do?
MAXcom
maxcom@theoffice.net
0
Comment
Question by:MAXcom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 400 total points
ID: 1339493
Hi

You must use the Application.HintHidePause property, which defaults to 2500 ms.

E.g. for 6 seconds:
Application.HintHidePause := 6000;

Cheers,
JB
0
 

Author Comment

by:MAXcom
ID: 1339494
Thanks, is there any way i can update the hint while its being shown? And display the new changes without having the user move the mouse off and then back onto the object.
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1339495
Hi

I don't think there is a way to change a hint while it's being shown.  You need to call TApplication.CancelHint (no problem there) and then TApplication.ActivateHint.  Unfortunately Borland (in their infinite wisdom!) have made ActivateHint a private method, so it can only be called by TApplication, and not from the outside.

JB
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1339496
Hi MAXCom

I have been playing around, and have a way to change the hint with minimal flicker.  (Unfortunately it does flicker a little as the hint changes.)

// - - - START OF CODE - - -
var
  OldPause: Integer;
begin
  OldPause := Application.HintPause;
  Application.HintPause := 0;
  Application.CancelHint;
  MyControl.Hint := 'This is a new hint';
  Application.ProcessMessages;
  Application.HintPause := OldPause;
end;
// - - - END OF CODE - - -

Cheers,
JB
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question