如何将表格放入帮助模式?

发布于 2025-01-04 18:15:09 字数 112 浏览 3 评论 0原文

我试图在 Delphi 2010 中将表单置于“帮助模式”。

我有一个用户单击的按钮,我希望光标更改为帮助光标,然后当用户单击控件时,控件的帮助显示

是否有我可以发送的窗口消息?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笔芯 2025-01-11 18:15:09

向表单发送 WM_SYSCOMMAND 消息,传递 <代码>SC_CONTEXTHELP 为lParam

将光标更改为带有指针的问号。如果用户随后单击对话框中的某个控件,该控件将收到一条 WM_HELP 消息。

在按钮 OnClick 事件处理程序中编写如下内容:

procedure TMyForm.Button1Click(Sender: TObject);
begin
  SendMessage(Handle, WM_SYSCOMMAND, SC_CONTEXTHELP, 0);
end;

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;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文