In on of the lecture notes that was given to me by my prof, I was told that setting the ResizeRedraw value to true would allow whatever I drew on the form to be, well, resized. However, it does not seem to work. Here is my code:
its not clear whats not working, it most likely is working as the code you showed looked to be compilable, and the redraw would tell the component to redraw if it were resized..
its not clear whats not working, it most likely is working as the code you showed looked to be compilable, and the redraw would tell the component to redraw if it were resized..
Well, the code does compile. It's just that when I maximize or minimize the window or drag the sides of the window and let go, the rectangle, which is centered, doesn't get redrawn. I don't know if it has to do with the ResizeRedraw = true; statement being in the constructor but according to my professor, it's supposed to work. Strangely enough, the resizing works when I place all the statements in the constructor to build the Rectangle in the Form1_Paint() method. Problem is, I don't understand why that is and why it isn't working when those statements are in the constructor.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.