Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I put a form in to help mode?

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?

like image 741
Paul Avatar asked Feb 09 '12 14:02

Paul


Video Answer


1 Answers

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;
like image 87
David Heffernan Avatar answered Oct 27 '22 01:10

David Heffernan