Hi,
Is it possible to create Pictureboxes during run time?
During design time, there is only 1 picturebox on the form but when the application is running, I would like to add more pictureboxes 'on the fly'.
Can this be done in vb.net?
Printable View
Hi,
Is it possible to create Pictureboxes during run time?
During design time, there is only 1 picturebox on the form but when the application is running, I would like to add more pictureboxes 'on the fly'.
Can this be done in vb.net?
intialize new pictureBox objectset its propertiesCode:dim newPictureBox as PictureBox
newPictureBox= new PictureBox()
add it to parent controlsCode:newPictureBox.Parent=me
newPictureBox.Location=new Point(10,10)
newPictureBox.Size=new Size(100,100)
Code:Me.Controls.Add(newPictureBox)
Thanks for the replies! :o
And to remove controls during run time, the code will be:
Me.controls.remove(Picturebox1) right?