Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21884

Get control of an image created dynamically(See post)

$
0
0
Sorry the title was not very descriptive, I'm not quite sure how to put it in words
Basically I create images in my script like this:

Dim img2 As Image
Set img2 = Controls.Add("VB.Image", "pm" & id)
img2.Picture = Form2.pm.ListImages(1).Picture
img2.Move 0, 0
img2.Visible = True


Now, from what I understand, this adds a "control" for this name "pm" & id(resulting in something like pm1, pm2, etc

How can I use this to move it later on? Would it be simply pm1.Move? if so, how can I write "pm1" dynamically( I have a for loop that counts up from 1, so I would need to be able to do something like (pm & id).Move)

Sorry if this doesn't make sense, but I'm a total noob here :)

Viewing all articles
Browse latest Browse all 21884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>