6

I am trying to put form into "help mode" in Delphi 2010.

I have a button which the user clicks, and I want the cursor to change to the help cursor, then when a user clicks onto a control, the help for the control is displayed

Is there a window message that I can send?

Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
Paul
  • 2,773
  • 7
  • 41
  • 96
  • 1
    possible duplicate of [How to place a form in help-requested mode?](http://stackoverflow.com/questions/986790/how-to-place-a-form-in-help-requested-mode) – Rob Kennedy Feb 09 '12 at 15:05
  • @Rob or this one: http://stackoverflow.com/questions/2392070/how-to-do-context-help-what-is-this-button-in-winforms Did you find the dupe by searching on the question, or on the answer? – David Heffernan Feb 09 '12 at 15:11
  • @David, it was the fourth result for "help mode." Lots of other questions ask *for* help instead of *about* it. – Rob Kennedy Feb 09 '12 at 15:15
  • @RobKennedy Good call. Actually the top hit is enough to answer the question – David Heffernan Feb 09 '12 at 15:16
  • Hi I posted this as a seperate question because it related to Winforms – Paul Feb 09 '12 at 18:24

1 Answers1

7

Send a WM_SYSCOMMAND message to the form passing SC_CONTEXTHELP as lParam.

Changes the cursor to a question mark with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message.

Write something like this in your button OnClick event handler:

procedure TMyForm.Button1Click(Sender: TObject);
begin
  SendMessage(Handle, WM_SYSCOMMAND, SC_CONTEXTHELP, 0);
end;
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490