A
amyl
I have an application where users can minimize it to the systray. I
would like when the user restores the application from the systray to
return to the previous forms size.
If the form was maximized when minimized and I use the following code
this.WindowState = FormWindowState.Normal ;
the form is not resized back to its previous maximized state.
I figured I could grab the location and size of the form prior to
minimizing using
formXLocation = this.Location.X;
formYLocation = this.Location.Y;
formSizeWidth = this.Size.Width;
formSizeHeight = this.Size.Height;
However, I am not sure exactly how to force the form back to those
sizes since you can't call
this.Location.X = ... since Location.X is not a variable.
Thanks,
Amy
would like when the user restores the application from the systray to
return to the previous forms size.
If the form was maximized when minimized and I use the following code
this.WindowState = FormWindowState.Normal ;
the form is not resized back to its previous maximized state.
I figured I could grab the location and size of the form prior to
minimizing using
formXLocation = this.Location.X;
formYLocation = this.Location.Y;
formSizeWidth = this.Size.Width;
formSizeHeight = this.Size.Height;
However, I am not sure exactly how to force the form back to those
sizes since you can't call
this.Location.X = ... since Location.X is not a variable.
Thanks,
Amy