VB.net 把窗口放在前面 [英] VB.net Bring Window to Front

查看:35
本文介绍了VB.net 把窗口放在前面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VB.net 2010 中的什么代码我需要设置一个窗口到屏幕的前面.

What code in VB.net 2010 do I need to set a window to come to the front of the screen.

我想要实现的是显示紧急警报类型,它是一种表单,出于某些原因我没有使用消息框.

What I am trying to achieve is to display an urgent alert type, its a form, for certain reasons I am not using message box.

有人建议使用以下代码,但这不起作用:

Someone suggested the following code, but this does not work:

  Private Sub frmMessage_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.BringToFront()
    End Sub

推荐答案

设置窗口的TopMost属性就足够了高于其他人.

It should be enough that you set property TopMost of the window that you need to get on the top of the others.

Form.TopMost = True

这篇关于VB.net 把窗口放在前面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆