|
-
Dec 23rd, 2009, 01:13 AM
#1
Thread Starter
Addicted Member
question about replacement for image control array upgrading from VB6
I am upgrading my program from VB6 to VB2010. In VB6 I am using about 200 pictureboxes loaded at runtime starting with one of each different picture
Private Sub Form_Load()
Image1(0).Top = 2340
Image1(0).Left = Screen.Width - 1300
Image1(0).ZOrder 0
For i = 1 To 19
Load Image1(i)
Image1(i).Top = 2340
Image1(i).Left = Screen.Width - 1300
Image1(i).Visible = True
Image1(i).ZOrder 0
Next
end sub
I search through all the pictureboxes then snap the picturebox the user dropped to a picturebox that is close by.
Private Sub CabinetWithDrawers_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
For i = Image1().LBound To Image1().UBound
If Image2(Index).Left >= Image1(i).Left + 623 And Image2(Index).Left <= Image1(i).Left + 1567 _
And Image2(Index).Top = Image1(i).Top Then
'snap to the right
Image2(Index).Left = Image1(i).Left + 1202
Exit For
Next
end sub
What can i use instead of control arrays in VB2010 to get the same functionality as in VB6, or does VB2010 use control arrays?
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
|