I need to draw a thick line between two Picture Boxes using code. Is there an easy way to do this, possibly similar to drawing a rectangle or circle? Any help is appreciated.

Re: Drawing Line between Two Picture Boxes 80 80

Get the graphics object of the form (this.CreateGraphics()) then use the DrawLine() method.

You'll need to put the line drawing in the Forms Paint event, otherwise resizing or moving another form over the form will erase the line (Things drawn on the form are not part of the form itself, thus don't get redrawn unless something redraws them).

Be a part of the DaniWeb community

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