chami.com/tips/
Last  Home  Next
 Internet
 Programming
 Windows


Click for details
Keywords
Delphi 2.x
Delphi
Functions

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;

 
Related Links Email Print 
Created on 29-Nov-1996. Source code colorized using CodeColorizer.
Copyright (C) 1996-99 Chami.com All Rights Reserved. Reproduction in whole or in part
or in any form or medium without express written permission of Chami.com is prohibited.
Information on this page is provided as-is without warranty of any kind. Use at your own risk.
Free Downloads | Products & Services | Privacy Statement | Terms & Conditions | Advertising Info