VB.net Bring Window to Front

Viewed 91543

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
20 Answers

Try this:

Me.ShowDialog()

should help.

Related