Ezguy Posted August 4, 2003 Posted August 4, 2003 Hi all, I need an urgent help regarding this. this is my problem. I am creating 10 dynamic picture boxes at run time like this. ----------------------------------------------- Dim picturea As New PictureBox() picturea.Size = New Size(100, 100) Me.Controls.Add(picturea) each of these 10 picture boxes has names Pic1,Pic2,Pic3,Pic4.... etc. Now I want to know how to control these dynamically. for example Can I use a for loop like below to control this for i=0 to 10 "pic" + i.left = 100 "pic" + i.right = 100 next Please help me thanks donny Quote www.itfriend.com [ get connected with your IT friends]
*Experts* Volte Posted August 4, 2003 *Experts* Posted August 4, 2003 You could declare the picture boxes as an array.Dim pic(9) As PictureBox '0-9 = 10 picture boxes Dim i As Integer For i = 0 to 9 pic(i) = New PictureBox() pic(i).Left = 100 pic(i).Top = 100 Next iSomething like that. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.