-
A know ... click the tool bar and draw ...
:D Of course I know that
but I am tring to the thing below
I already build a Array of only one image control
How do I add more image to this Array with commands ?
(Have to create image with commands ... in fact)
:confused:
I don't think anyone would be able to do it !
-
Just put the controls index to 0 at designtime and use load command to load another instance of it (1).
-
You got about halfway there, you nead to use
Load Image1(intNewIndex) to get a new image. The new image is invisible, and has exactly the same properties as the old one. So you need to make is visible and move it.
Here's an example using command buttons. You need a form with a command button Command1 on it, set it's index property to 0.
add this code
Code:
Dim MaxIndex As Long
Private Sub Command1_Click(Index As Integer)
MaxIndex = MaxIndex + 1
Load Command1(MaxIndex)
Command1(MaxIndex).Visible = True
Command1(MaxIndex).Top = Command1(MaxIndex - 1).Top + Command1(0).Height
End Sub
Hope this Helps
-
Well, sam, he didn't ask for that, he did just ask to create a instance of an object. But ofcourse if it's an image you need to move it and have the original invisible and things, probably also loading new images into that. But he can do it by himself
-
Ah, but the command button example was a lot because you don't need to load pictures etc in. Plus I provided some code.
-
If you would like to create it from scratch, than read the
method I posted in this thread (Only available in VB6)
http://forums.vb-world.net/showthrea...threadid=17020