Cita de
milvio en 17 de noviembre de 2024, 19:20
Public Class Form1
Private Sub btnMostrar_Click(sender As Object, e As EventArgs) Handles btnMostrar.Click
My.Application.OpenForms.Cast(Of Form)().Except({Me}).ToList().ForEach(Sub(form) form.Close())
Form2.MdiParent = Me
PanelPrincipal.Controls.Add(Form2)
Form2.Show()
Form2.WindowState = FormWindowState.Maximized
End Sub
End Class
Public Class Form1
Private Sub btnMostrar_Click(sender As Object, e As EventArgs) Handles btnMostrar.Click
My.Application.OpenForms.Cast(Of Form)().Except({Me}).ToList().ForEach(Sub(form) form.Close())
Form2.MdiParent = Me
PanelPrincipal.Controls.Add(Form2)
Form2.Show()
Form2.WindowState = FormWindowState.Maximized
End Sub
End Class