Re: Mike D Sutton please need help....



In the example you once gave me you created 4 boxes which were
connected by ropes (lines). These I could move around on the form.

class module Box:
Public Sub Draw(obj As Form)
obj.Line (x - 360, y - 360)-Step(720, 720), Color, BF
obj.Line (x - 360, y - 360)-Step(720, 720), vbBlack, B
obj.CurrentX = x - 270
obj.CurrentY = y - 270
obj.Print Text;
End Sub

class module rope:
Public Sub Draw(obj As Form)

On Error Resume Next
obj.Line (A.x, A.y)-(B.x, B.y), vbBlack
obj.CurrentX = (A.x + B.x) \ 2 - (Len(Text) \ 2) * 100 'elke letter
is 100 breed
obj.CurrentY = (A.y + B.y) \ 2
obj.Print Text;
End Sub

But now I want to have icons (in an image) that I want to connect to
eacht other with lines and be able to move them on the form. Could you
give me an example on how to do that?

Should I add the pictures to a button maybe?

Marco

Mike D Sutton schreef:

I looked at the page but it is not exactly what I'm looking for.
I have a form with a PictureBox, an ImageList and an Image.
The ImageList holds the icons I want to show. THey are loaded into the Image.
Then the image is displayed in a circle on the form. With one extra in the middle of
the circle. The one in the middle of the circle should be connected
with all the others with a rope.

Rope? Presumably this is just a line?

I want to be able to drap all the icons into another position.

To move the positions of your objects, you'd need to re-draw the background to erase the objects in their current
positions, and re-draw them in their new positions. If you need to pick objects up and drag them to a new position then
you'd need to write some kind of hit-test then erase and re-draw the objects as they're dragged.
Hope this helps,

Mike


- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/

.


Loading