Form.Resize getting error when Minimize or Maximize is pressed
-
I'm running VB6.0. I have a form that I need to be able to Maximize and Minimize, but I also have a Form.Resize procedure. During runtime, when I click the Minimize or Maximize button, I get an error (non-fatal) that says "A form can't be moved or sized while minimized or maximized". It's obviously trying to run my Form.Resize procedure. When I click Maximize, I want it to run the Form.Resize function because I do not want the form at its maximum width (full screen). When I click Minimize, I want it to be in the toolbar only, with no error. Here are the questions: 1. Is there a way to create a MaxWidth for the form, so when I click Maximize, it only goes to that width. 2. Is there a way to NOT run my Form.Resize when Minimize or Maximize is pressed or have it run without giving me the error? Thank you.