How do I put a form in to help mode?

怎甘沉沦 提交于 2019-12-12 11:29:12

问题


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?


回答1:


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;


来源:https://stackoverflow.com/questions/9212917/how-do-i-put-a-form-in-to-help-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!