Question : vb.net - active form

hello there,
I have a little application that has 3 forms.. the Main form then about and settings..
when all 3 forms are open and I click on firefox or other opened application and then click on the vb.net application
it only shows the main form.. I have to minimize the other app to get back and see about or settings..
im trying to accomplish the same thing as old vb6.. when you click on the app it shows all forms..
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
>>VB6 code
Private Sub Command1_Click()
        Form2.Show
        Form3.Show
End Sub


>>VB.net Code
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Form2.Show()
        Form3.Show()
    End Sub
End Class

Answer : vb.net - active form

Pass the main form into the Show() method so that it will be the "owner" of the other two forms:
1:
2:
3:
4:
5:
6:
7:
8:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Form2.Show(Me)
        Form3.Show(Me)
    End Sub

End Class
Random Solutions  
 
programming4us programming4us