how do i create an object at runtime? i need to have an arbitrary number of picture boxes on a form. now, i guess i could put a few hundred (yes, i need hundreds) off in the corner and use them as i need them, but im almost positive i can just sponataneously generate them as i need them.
any insight?
ps. visual basic 6
visual basic question... marshall, im looking at you
Moderator:Moderators
"Linux is only free if your time is worthless"
- marshallh
- Moderator
- Posts:2986
- Joined:Sat Sep 10, 2005 2:17 pm
- 360 GamerTag:marshallh
- Location:here and there
- Contact:
You just need one picturebox with the attributes set to what you want. Set its ArrayIndex to 0.
Make a command button or something, and put in
Make a command button or something, and put in
Code: Select all
For i = 1 to how_many_boxes_you_need
Load picBlah(i)
picBlah(i).Visible = True
picBlah(i).Left = wherever
picBlah(i).Top = wherever
Next
- shmagoogin77
- Portablizer
- Posts:1469
- Joined:Sun Apr 17, 2005 6:10 pm
- Location:My desk
- Contact: