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:
  1. 'Loads image boxes for picture results display (on picture box)
  2.                 Load frmAttribute.imgResult(rowNum)
  3.                     If ((rowNum Mod 5) <> 0) And ((rowNum \ 5) = 0) Then
  4.                         frmAttribute.imgResult(rowNum).Left = frmAttribute.imgResult(rowNum - 1).Left + _
  5.                                                        (1.5 * frmAttribute.imgResult(0).Width)
  6.                     ElseIf (rowNum Mod 5) = 0 Then
  7.                         frmAttribute.imgResult(rowNum).Top = frmAttribute.imgResult(rowNum - 1).Top + _
  8.                                                       (1.5 * frmAttribute.imgResult(rowNum).Height)
  9.                      ElseIf (rowNum \ 5) = 1 Then
  10.                         frmAttribute.imgResult(rowNum).Top = frmAttribute.imgResult(rowNum).Top + _
  11.                                                       (1.5 * frmAttribute.imgResult(rowNum).Height)
  12.                         frmAttribute.imgResult(rowNum).Left = frmAttribute.imgResult(rowNum - 1).Left + _
  13.                                                       (1.5 * frmAttribute.imgResult(0).Width)
  14.                     End If
  15.                    
  16.                     'Shows picture results
  17.                     frmAttribute.imgResult(rowNum).Visible = True
  18.                         If (rowNum = 1) Then
  19.                             frmAttribute.imgResult(0) = LoadPicture(adoRec.Fields("Path") & "\" & _
  20.                             adoRec.Fields("PictureName") & ".jpg")
  21.                          Else
  22.                             frmAttribute.imgResult(rowNum - 1) = LoadPicture(adoRec.Fields("Path") & "\" & _
  23.                                                           adoRec.Fields("PictureName") & ".jpg")
  24.                         End If
  25.                 adoRec.MoveNext
  26.             Next rowNum

THANX -Justin-