|
-
Apr 8th, 2006, 01:51 PM
#1
Thread Starter
Member
[RESOLVED] Howto add Controls at runtime with for next
I wondered if it is possible to add Controls on my form at run-time, but the number of Controls various through 1 to 144. Loading some filenames in a listview, then I count the items. The number of items counted, so much Controls I wanna add in my Panel Control.
I know the code beneath is wrong, but how can it be done?
Dim a as Integer
For a= 1 to CountedFiles
Dim picMini & string(a) As New PictureBox()
picMini & string(a).ImageLocation = strJPGname
Panel1.Controls.Add(picMini & string(a)
Next a
Please let me know a good solution. Thanx in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|