如何让我的 VB.net 表单聚焦于现有用户窗口和应用程序之上?

发布于 2024-08-21 21:06:23 字数 113 浏览 6 评论 0原文

我有一个 Visual Basic .Net 表单(在启动屏幕测试数据库连接后启动),并且它在启动时不会聚焦在其他现有窗口之上。

如何让它聚焦于所有现有窗口和 Windows 资源管理器窗口之上?

I have a Visual Basic .Net form (launches after the splash screen tests database connectivity) and it is not focusing above other existing windows on launch.

How do I get it to focus above all existing windows and Windows Explorer windows?

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

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

发布评论

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

评论(1

牵强ㄟ 2024-08-28 21:06:23
Form.Topmost = true;

请参阅相应的 MSDN

最顶层的表单是重叠的表单
所有其他(非最顶层)形式甚至
如果它不是活动的或前台的
形式。最上面的表格总是
显示在最高点
桌面上窗口的 z 顺序。
您可以使用此属性来创建
始终显示在您的表单中
应用程序,例如查找和
替换工具窗口。

Form.Topmost = true;

See the corresponding MSDN.

A topmost form is a form that overlaps
all the other (non-topmost) forms even
if it is not the active or foreground
form. Topmost forms are always
displayed at the highest point in the
z-order of the windows on the desktop.
You can use this property to create a
form that is always displayed in your
application, such as a Find and
Replace tool window.

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