none
Cannot Maximize form after it has been Minimized in Visual Studio 2010, 2015 and 2017 RRS feed

  • Question

  • Hi!

    I have built a normal Windows.Forms project. I develop it in Visual Studio 2010, 2015 and 2017 -. same problem no matter which version I use. Everything builds correctly - without any errors.

    If I then start or run the project, the form loads and displays correctly - both when I run it from the debugger and when I start the .exe file normally. So far - so good.

    If I now click on the minimize.button (top-right) on the form or double-click on the top banner of the form, the form minimizes to the bottom of the screen quite as normal, but when I now double-click on the icon of the minimized form on the bottom line, the form just flickers and is shown in what seems to be its initial (on initial load) state on the screen whereafter it disappears after about 1/10 to 1/2 second. Subsequent double-clicks on that same icon of the minimized form produces no aditional results, and the only remedy thereafter  is to right-click on the icon of the minimized program and then proceed to click on "close <name of the project>". If I do this, the project closes down and exits normally and then has to be re-started.

    Any suggestions?

    Max Jensen

    mjensen@ipd-us.com


    Max Jensen at Human Technologies Europe

    Thursday, March 29, 2018 10:41 AM

All replies

  • Interesting. How did you realize this?

    I assume that you tested this already with a new empty forms project and it did not act in the same way.


    Success
    Cor


    Thursday, March 29, 2018 12:44 PM
  • Hi

    Do you have *any* Try .... Catch code where the Catch section is empty?


    Regards Les, Livingston, Scotland

    Thursday, March 29, 2018 12:45 PM
  • Hi!

    I sure did. All my other Windows Forms orogram do not have this problem.'

    Max


    Max Jensen at Human Technologies Europe

    Thursday, March 29, 2018 1:17 PM
  • Hi!

    No. I have several Try-Catch sections, but all are populated in both the Try and the Catch section.

    Max


    Max Jensen at Human Technologies Europe

    Thursday, March 29, 2018 1:18 PM
  • Then there is something wrong with your code, but only those who are able to see that can help you.


    Success
    Cor

    Thursday, March 29, 2018 1:25 PM
  • Hi Cor!

    I do not understand your second comment: "Success"?

    My earlier answer was: Yes. I have several (in fact many) other Forms-based projects, and none of these exhibit this problem.

    Max


    Max Jensen at Human Technologies Europe

    Thursday, March 29, 2018 1:29 PM
  • Hi Max, 

    And my reply to you was that without code nobody can help you. 

    (Success is only a standard setting in my forums settings. I wish everybody success :-)


    Success
    Cor

    Thursday, March 29, 2018 1:32 PM
  • Hi!

    No. I have several Try-Catch sections, but all are populated in both the Try and the Catch section.

    Max


    Max Jensen at Human Technologies Europe

    Hi

    Do you use the Form Resize event handler?


    Regards Les, Livingston, Scotland

    Thursday, March 29, 2018 1:36 PM
  • Hi Les!

    Haven's done so in the past, so the answer is No - but I will try to see, if this might get rid of the problem.

    Besides from that: Thanks for your answer.

    Max


    Max Jensen at Human Technologies Europe

    Thursday, March 29, 2018 2:07 PM
  • What form events are you handling?  Activated, VisibleChanged, MaximizedBoundsChanged, Paint... any of these?  Somewhere you have a bug in your code that is causing the unwanted behavior.  Look to anything which executes when the form size, visibility, or window state change.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Thursday, March 29, 2018 2:20 PM
    Moderator
  • Hi Cor!

    I do not understand your second comment: "Success"?

    My earlier answer was: Yes. I have several (in fact many) other Forms-based projects, and none of these exhibit this problem.

    Max


    Max Jensen at Human Technologies Europe

    Well if no others exhibit the problem then create a new Windows Form app with no code and see if it exhibits the problem. If it does not then your projects code is probably the issue. Although perhaps you even used a namespace or class for a variable name or something. There's many aspects to a project and whatever is causing this isn't something we can see from the code you display for the app.

    The same app malfunctions in 3 versions of visual studio as well when just the .exe is launched but no other apps do this so go figure.


    La vida loca

    Friday, March 30, 2018 10:47 AM