Delphi 应用程序失去焦点
我在我的应用程序中实现了这个 chevron 工具栏,它工作得非常好;但是,当我单击菜单上的任何项目时,我的应用程序就会失去焦点。即使我将鼠标移到窗体的一角,光标也不会更改为调整大小手柄。我需要单击表格或应用程序才能重新获得焦点,但我不想这样做。调用菜单项后调用 MainForm.Setfocus 没有帮助。我希望焦点自动集中在我的应用程序上,这样我的用户在执行他们需要做的事情之前不需要单击表单。
关于如何重新关注表单和/或应用程序有什么想法吗?
谢谢
I implement this chevron tool bar in my application and it works perfectly great; however, when I clicked on any items on the menu, my application loses focus. Even if I move my mouse over the the corner of the form, the cursor doesn't change to the resize handle. I need to click on the form or application in order to regain focus which I would not like to have to do. Calling MainForm.Setfocus after calling the menu item doesn't help. I would like to have the focus be automatically on my application so my users don't need to click on the form before doing the things they need to do.
Any idea on how to regain focus on the form and/or application?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
拦截WM_KillFocus消息。
伪代码
这个终端上没有Delphi,回家后会填补空白。
Intercept the WM_KillFocus message.
pseudo code
don't have Delphi on this terminal, will fill in the blanks when home.