Hi jmcilhinney,
could you please explain the code? I want to have a picturebox and then on button click I want the programm to draw a contour. When the users clicks on a different button now the programm should dynamically create buttons over the whole picturebox with the contour still being visible. When I use your second private sub I can see the contour. What is the first private sub there for? When I just use 4 buttons and let the programm do single steps I can see that the second private sub is being repeated exactly 4 times but the sender is always the picturebox. I really don't get it why the sender is the picturebox but the line is drawn on the buttons. Thanks in advance.