Hack Forums
[.NET] Control in side a control - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Control in side a control (/showthread.php?tid=3606125)



Control in side a control - Doomsapian - Jul 8, 2013

I'm manually coding a picture box like so:
Code
Private Map As New PictureBox()

Picturebox.Dock = DockStyle.Fill
Picturebox.Image = My.Resources.utes
Me.Controls.Add(Picturebox)
How do I add in a panel, and then nest the picture box inside the panel?


* - dreamer66 - Jul 8, 2013

Similar to the form the panel has a "Controls" property which you can call Add in order add controls into it.

panel1.Controls.Add(....)