My question is related to Stack Overflow question Draw lines on a picturebox using mouse clicks in C#, but when the mouse button is up, the drawn line disappears. H
gainbox.refresh() should stay inside the if (mouse_dn) clause.
gainbox.refresh()
if (mouse_dn)