none
Minimize, Maximize and Close button style when running in windows 10 RRS feed

  • Question

  • Using Visual Studio 2008 and C#. 

    When running application #1 and #2 on windows 7 platform Min, Max, Close buttons show up as square adjacent buttons that work correctly.

    When running application #1 and #2 on windows 10 platform.

    Application #1 buttons are underline, square and X like it should be and works correctly.

    Application #2 buttons are displayed as windows 7 buttons and do not react to mouse clicks.  The mouse focus locations are off to the left to where the buttons should be in a Windows 10 system.

    What am I doing wrong with Application #2.  Also child windows all start with the wrong style of Minimum, Maximum and Close buttons.  Because Application #1 does not have this problem I do not thing it is a VS2008 problem.

                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(713, 401);
                this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
                this.MainMenuStrip = this.menuStrip;
                this.Name = "MainForm";
                this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

    Wednesday, December 4, 2019 8:32 PM

Answers

  • There was an entry in the code.

    Application.VisualStyleState = NoneEnabled

    Once I commented it out things ran fine.

      - Thank You

    • Marked as answer by HansCoder Thursday, December 5, 2019 11:29 PM
    Thursday, December 5, 2019 11:28 PM

All replies

  • Hi HansCoder,

    Thank you for posting here.

    Since your problem may be related to the system environment, I suggest that you could report this issue in the following website.

    Developer Community.

    Hope this could be helpful.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 5, 2019 9:05 AM
  • I assume both apps running on the same system everything else the same etc and you have compared all the properties etc?

    Last resort you can make a copy and then start removing things from app 2 and testing until it behaves like app 1. The last thing you removed contains the problem. :)

    Make a new project and copy app2 into it until you get the problem.

    Thursday, December 5, 2019 11:05 AM
  • There was an entry in the code.

    Application.VisualStyleState = NoneEnabled

    Once I commented it out things ran fine.

      - Thank You

    • Marked as answer by HansCoder Thursday, December 5, 2019 11:29 PM
    Thursday, December 5, 2019 11:28 PM