tags:

views:

389

answers:

1

Using VB6, i have a line object that can be dragged around at its end points by the user, and i'd simply like an arrow in the middle of it to show the direction of the line.

Is there a simple way to do this?

+4  A: 

Dmatig,

This should do what you need. You may need to tweak it a little to put the arrowhead in the middle of the line rather than at the end:

Drawing Arrows Between Two Vectors in Visual Basic 6:
http://www.vb-helper.com/howto_draw_arrows.html

Robert Harvey
Thanks for this. This is one option i considered (though implementing it is a little trickier), i was hoping there's something a little less scrappy. Especially considering i will have a lot of lines, the code would quadruple in size just for arrows! Again thatks for the reply, it's nice to know how to implement this idea.
Dmatig
@Dmatig. Hopefully you would just write a routine that draws a line with an arrow in the middle. Then change your "draw lots of lines" code to "lots of calls to the line with arrow routine". The code won't quadruple in size, it will stay the same.
MarkJ