Suppose I have a picture box on my form and I want to show a line that can move across the box. Perhaps it's tracking my cursor or it's programmatically moved. How do I do that? I know I can explicitly draw a line on the bitmap, but that doesn't allow me to subsequently move it. What's the standard technique for doing this?

I think it would be done by clearing the line and redrawing in the new position, say incrementing the x co-ord by 1 to move it right.

Not entirely sure thats the only way though.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.