how to show windows forms in panel in vb.net
How to show windows forms in a panel in vb.net code
create a function with form parameter as a form object
copy this code and apply anywhere in the form
Dim currentForm As Form
Sub formOpen(ByVal form1 As Form)
If currentForm IsNot Nothing Then
currentForm.Close()
End If
currentForm = form1
Panel1.Controls.Clear()
form1.TopLevel = False
Panel1.Controls.Add(form1)
form1.Show()
End Sub
Now create a Button on click event and call this form
formOpen(Form4)
Note Form4 is form name you would be paas only form name as parameter.
Azad Mohammed
An editor at AzadEducationI'am Azad, These blogs, tech skills and programing news, I am sharing with my exprience. I have 4+ year experiece in the web development. Also we are learning investing ideas. I believe in "big mind big dream", that will convert in smart mind. You can follow me on Linkedin profile.