I'd like to open a form inside a panel, but when it opens, it always stays the same size and in the same place regardless of the size of the form or form.
DimrvAsNewformRVrv.link=lvPasta.SelectedItems(0).ImageKeyrv.FormBorderStyle=FormBorderStyle.Nonerv.Dock=DockStyle.Fillrv.TopLevel=FalseDimpAsNewPanelWithpSize=NewSize(Me.Width,Me.Height)Location=NewPoint(Me.Location.X,Me.Location.Y)EndWithMe.Controls.Add(p)p.BringToFront()p.Controls.Add(rv)p.Show()rv.Show()
Edit:
Inadditiontopanel
Ijusttriedtocreatethenewformanddisplayitbyhidingtheoldform,butIhadtheproblemofthe"blinking" screen while the form swap (main form some - windows chunk - new form appears) and the buttons so that when the new form was closed by "X" (where it normally closes a program) the first form was closed, but when it clicked on another button to "come back" it closed the form2 but not the first form .
Dim rv As New formRodaVideo
rv.linkvideo = lvPasta.SelectedItems(0).ImageKey
rv.FormBorderStyle = FormBorderStyle.Sizable
rv.TopLevel = True
rv.Width = Me.Width
rv.Height = Me.Height
rv.Location = Me.Location
rv.WindowState = FormWindowState.Normal
rv.StartPosition = FormStartPosition.WindowsDefaultBounds
rv.Show()
Me.Hide()