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


Click for details
Keywords
Delphi 1.x
Delphi 2.x
Delphi
Functions
User Interface
Win32

Search for help...

Looking for a way to open your application's help file to it's search window? All you have to do is pass the name (and the path) of your help file and the string you want to search for to the following HelpSearch() function:

procedure HelpSearch(
  sHelpFName,
  sSearchKey : string );
var
  pc : PChar;
begin
  Application.HelpFile := sHelpFName;
  pc := StrAlloc(
          Length( sSearchKey ) + 1 );
  StrPCopy( pc, sSearchKey );
  Application.HelpCommand(
    HELP_PARTIALKEY, LongInt( pc ) );
  StrDispose( pc );
end;

For example:

HelpSearch( 'DELPHI.HLP', 'colors' );

If you just want to open the "search" window without specifying a search string:

HelpSearch( 'DELPHI.HLP', '' );

 
Related Links Email Print 
Created on 27-Dec-1996.
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