Hello Everyone,
Simply question for some of you to answer (by just looking at some of the posts). I have a database that searches traverses through loading images into image boxes on a big picture box.
The image boxes are loaded at startup in an array. It places each image box evenly spaced on the picture box (5 across X however many down).
I want to move those images anywhere in the picture box rearranging the images in any order by draging and dropping or clicking (if easier).
Unfortunately I am not sure how to start but I can supply some of my code that creates the image boxes with the loaded images:
...some search routine in for loop using rowNum as index...
VB Code:
'Loads image boxes for picture results display (on picture box) Load frmAttribute.imgResult(rowNum) If ((rowNum Mod 5) <> 0) And ((rowNum \ 5) = 0) Then frmAttribute.imgResult(rowNum).Left = frmAttribute.imgResult(rowNum - 1).Left + _ (1.5 * frmAttribute.imgResult(0).Width) ElseIf (rowNum Mod 5) = 0 Then frmAttribute.imgResult(rowNum).Top = frmAttribute.imgResult(rowNum - 1).Top + _ (1.5 * frmAttribute.imgResult(rowNum).Height) ElseIf (rowNum \ 5) = 1 Then frmAttribute.imgResult(rowNum).Top = frmAttribute.imgResult(rowNum).Top + _ (1.5 * frmAttribute.imgResult(rowNum).Height) frmAttribute.imgResult(rowNum).Left = frmAttribute.imgResult(rowNum - 1).Left + _ (1.5 * frmAttribute.imgResult(0).Width) End If 'Shows picture results frmAttribute.imgResult(rowNum).Visible = True If (rowNum = 1) Then frmAttribute.imgResult(0) = LoadPicture(adoRec.Fields("Path") & "\" & _ adoRec.Fields("PictureName") & ".jpg") Else frmAttribute.imgResult(rowNum - 1) = LoadPicture(adoRec.Fields("Path") & "\" & _ adoRec.Fields("PictureName") & ".jpg") End If adoRec.MoveNext Next rowNum
THANX -Justin-




Reply With Quote