Create your own hints
If you don't quite like the way how Delphi's default
hints look like, you can use
THintWindow
component to create your own customized hint window.
Here's an example:
var
h : THintWindow;
r : TRect;
begin
with r do
begin
//
// set the position and size
// of the hint window
//
left := 10;
top := 50;
right := 200;
bottom := 100;
end;
h := THintWindow.Create( Self );
with h do
begin
//
// set the background color
//
Color := clRed;
ActivateHint( r, 'hi there!' );
//
// perform your tasks here
// before closing the hint window
//
MessageBox( 0,
'Press any key to close the '
+ 'hint window',
'THintWindow',
MB_OK );
ReleaseHandle;
Free;
end;
end;
|
Applicable Keywords : Delphi, Delphi 2.x, Functions