Opa
I have a function to open forms inside a general container.
Function carrega_form(ByRef ctl As Control, ByRef frm As Form)
If ctl IsNot Nothing AndAlso frm IsNot Nothing Then
frm.TopLevel = False
frm.FormBorderStyle = FormBorderStyle.None
frm.Dock = DockStyle.Fill
frm.Visible = True
ctl.Controls.Add(frm)
End If
End Function
To call it use:
carrega_form(container, New frm_content_cadastro_botoes)
I want to be able to create a new form in the main form, so I have to create a new form, but when running again nothing happens.
I tried before calling the function to use: container
, but it still does not call the form as it should.
If you use the call to different containers it works.
The container object is a Panel