Hi!
I have a container,in this container i have a button,when i click in the button a new form is open(mdichild).What i have to do to every time i click the button,when a new form is open the other is closed?


The code:
sub button_click()
If (tipo = 1) Then
Dim tipoTexto As New Texto()
tipoTexto.MdiParent = Me
tipoTexto.Show()
end if

If (tipo = 2) Then
Dim tipoImagem As New Imagem()
tipoImagem.MdiParent = Me
tipoImagem.Show()
end if

end sub

When the form "tipoImagem" open i want that the form "TipoTexto" is closed.

tanks!