Want to hire a BMax programmer

BlitzMax Forums/BlitzMax Programming/Want to hire a BMax programmer

You say you require Drag & Drop functionality to re-order the images. This is quite easily accomplished without having to resort to 50 seperate Picture Boxes.

I did the same as you in my puzzle game initially. All seperate images where put in therir own Picturebox. I felt it needed to be this way because I wanted easy acces to mouse events for ech Image. It didnt matter how large the images where, the result was horribly slow and definatly not worth persueing.

If you can resize the origial images so that 50 of them fit on the screen, you can then draw them all to a single large Image.

You can then use some very simple Bounds checking with the current Mouse position to see which of the thumbs is currently under the Mouse cursor. The actual Dragging code is a breeze.

- User presses mouse on a Thumbnail
- Store the Thumb ID or X/y position within the large image as the Dragging Start-point.
- Then as long as the mouse is pressed you can draw a seperate small image that moves with the mousecursor, preferable a semi-transparent version of the selected thumbnail, or simply an outline rectangle the size of your thumbnail. That way the user can easily see that he is dragging something.
- When the mouse is released, Find the thumbnail again that is under the mousepointer. (You allready stored the first one), and just swap them.