For runtime creation within the PictureBox, I was playing with this code (works, but may need adjustment):
'Manually add a PictureBox control to a form first, then run this code
Private Sub Form_Activate()
Dim Shape1 As VB.Shape
Set Shape1 = Controls.Add("VB.Shape", "Shape1", Form1)
Set Shape1.Container = Picture1
Shape1.Visible = True
Shape1.Shape = 3 'Circle
You should be able to extend this to any number of Shapes by creating a control array.
"May the code that you write never work in ways that you didn't expect; and may the code that you didn't write never require you to maintain it". - Ancient Chinese Proverb
Last edited by Cerian Knight; 06-26-2012 at 01:46 PM.