如何防止弹出表单夺走父级的焦点
我有一个小的 windows.form,当鼠标悬停在 windows.Form 上的某个区域上时,我用它来显示信息,但是当它设置为可见时,它会从父窗口获取焦点。有没有办法防止这种情况 - 它会导致主窗体在焦点和焦点之间切换时闪烁。
时间:2019-03-09 标签:c#、.net 2.0、system.windows.forms
I have a small windows.form that I use to present information when the mouse is over a regions on a windows.Form, however it takes the focus from the parent window when it is set to visible. Is there w way of preventing this - it causes the main form to flicker as it toggles between in focus and out.
c#, .net 2.0, system.windows.forms
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将其粘贴到您的弹出表单类中,它会阻止它在显示时被激活:
Paste this into your popup form class, it prevents it from being activated when shown:
有关其他命令,请参阅 ShowWindow 函数。
See ShowWindow Function for additional commands.