I have a similar question...
hey, i have a similar question, but this question is not about dc and stuff....
I am trying to make a picture box duplicate.....
I currently know of two methods for duplicateing the picturebox and i am looking for a better way to dupe it...
method 1:
(at design time)
create an array of 10 pictures and stack them on top of each other and evrytime some one presses the "duplicate" button, one will just move down... and so on... (not too smooth because after 10, there will be no more...)
method 2:
(at design-time)
i will create an imagebox as follows:
Object: picLetters()
Property: Index
Value/Setting: 0 to 10
and then the do the same as method 1... note that the value/setting for Index property is a constant 0 to 10 and not dynamic...
Basically I want to be able to do method 2 at runtime instead of design time...
Example: (but doesnt work)
Code:
Private Sub Command1_Click()
Dim tempTxt As String
Dim textLen, i As Integer
Dim picLetters() As PictureBox
tempTxt = LCase(Text1.Text) 'the name
textLen = Len(tempTxt) 'length of the name
ReDim picLetters(0 To textLen) As PictureBox
For i = 0 To textLen
''get an image for each letter of the name; "block_[letter].gif"
picLetters(i) = LoadPicture(App.Path & "/images/block_" & Mid(tempTxt, i + 1, 1) & ".gif")
picLetters(i).Top = picLetters(i - 1).Top + 1000 'move picBox 1000 units below previous picBox
Next i
End Function
can anyone please help?
Thank you.