Hello
I have a paint program created in C#/GDI, it's supposed to draw shapes or draw with a pen freely (and be able to change pen width and color). So far I have managed to create such a program which draws on a panel using MouseUp/Down/Move events. But there is something I cannot resolve (even though I'll bet it's so simple to solve I'll look stupid), when I maximize the window, the panel is also resized (as I have docked it) but I can only draw on a portion of it which was the same size as the window when the program started (800x400 approx.). I would like to be able to resize the panel along with the window, so that no matter how big the window is I can draw on the whole surface of the panel.
I hope I have made enough sense.
Thank you in advance!
Source code available if needed.
I have a paint program created in C#/GDI, it's supposed to draw shapes or draw with a pen freely (and be able to change pen width and color). So far I have managed to create such a program which draws on a panel using MouseUp/Down/Move events. But there is something I cannot resolve (even though I'll bet it's so simple to solve I'll look stupid), when I maximize the window, the panel is also resized (as I have docked it) but I can only draw on a portion of it which was the same size as the window when the program started (800x400 approx.). I would like to be able to resize the panel along with the window, so that no matter how big the window is I can draw on the whole surface of the panel.
I hope I have made enough sense.
Thank you in advance!
Source code available if needed.
Comment