[RESOLVED] Form inside a From
Hey guys, :wave:
I have one main form(form1) where i would like to chose other forms to open inside it but i dont know how to do that. For example, i made a screen shot of the main form(form1). I wanted that when i click in the report button to open another form(form2) i have inside the area that i draw in black. How can i do that?
Also can i change the debuggin form, because when i debug my application it always shows the form2 and i wanted it to show the form one.
http://img.photobucket.com/albums/v2...total/form.jpg
Thx in advance for the help :D
Re: [RESOLVED] Form inside a From
Another way if you want the second form to be easily made to look like a part of the first form (the user can't drag it etc.)
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim InsideForm As New Form2
InsideForm.TopLevel = False
Me.Controls.Add(InsideForm)
InsideForm.FormBorderStyle = FormBorderStyle.None
'where to show the from, the coordinates are relative to the mother form, not the screen
InsideForm.Left = 20
InsideForm.Top = 20
InsideForm.BackColor = Color.Blue 'just a demonstration where the second form is
InsideForm.Show()
End Sub