Share via

How do I draw broken line with a rectangle at the end of it

user20 161 Reputation points
Dec 15, 2022, 12:21 PM

I have a form and a picturebox on it.
and I must draw broken line by click on picturebox and by double click on picturebox The lines is finished. I khnow how do it by draw.lines, but my problem is the end of the last line where the rectangle should be.

I don't khnow how put a rectangle at the end of last line with the right direction to the last line!
I hope I have explained my problem correctly.

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,769 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 86,511 Reputation points
    Dec 15, 2022, 1:12 PM

    You can use CustomLineCap
    Test by modifying the MSDN sample with a square :

    271035-customlinecap.jpg

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.