I have a Winform application with a picturebox that I want to be able to draw on. To do that, I generated a method for the picturebox.Paint event. However, ever since I added a paint event to my picturebox my winform does not display properly on start. Starting the application only partially loads the form
And I have to drag the application window with my mouse to get it to finish rendering
Not only that, for anything I do that changes anything on the form, the change is not visible until I drag the window. I know something about the paint event is triggering it because getting rid of it fixes the problem. Having an empty paint event method also stops the bug. Even a paint method as simple as this
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
pictureBox1.Image = null;
}
causes the bug to occur. Any help would be greatly appreciated!