none
I Reset my VS2013 ToolBox and some controls behave strangely

    Question

  • Yesterday, I reset my Toolbox in VS2013. Now any form in my visual basic projects that contains a Label control that is docked or that is contained in another control that is docked causes its forms .resx and designer files to be regenerated when the project is loaded.  This forces me to save on exit even if no changes have been made.  The same is true for TextBox and MaskedTextBox controls.  The controls also flash a lot when the project is loaded or shut down (like they are being repainted over and over again).

    If is set the Dock property to "None" for these controls the .resx and designer files for the containing form are not regenerated at startup.

    I have VS 2008, 2010, 2013, and 2015 installed on my PC.  This now happens with all of them.

    My project builds and runs fine.

    Do all Visual Studio versions share the Toolbox?  How can I correct this?  Any help is greatly appreciated.

    Thanks.

    Thursday, December 1, 2016 3:54 PM

All replies

  • Hi Rob Remke,

    According to your description, I tested in both of my Visual Studio 2013 and Visual Studio 2015. They are all have this issue. And I found that even I don't reset my Toolbox, the WinForm application also has this issue. So I'm afraid that this is the default action for WinForm application in Visual Studio.

    Then I try use source control to compare what changed when I reopen the project. After comparing, I found there doesn't have any changes on the forum. So we could save the forms safety.

    And I also found a workaround for this issue. When I change the Anchor property for the Docked control and save the changes, if I reopen this project, the form designer will not display as changed. You could change the Anchor property as any value, even change it -> Save it and then change it back to the default value and save.

    So you have two choices, one is ignore the change icon on the form because it doesn't change anything in fact. Another one is change the Anchor property for the Docked control and save them. Then it will not show the changed icon on that form.

    Best Regards,
    Weiwei


    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.

    Friday, December 2, 2016 2:48 AM
    Moderator
  • Thanks much for the quick reply.  Thanks for testing and determining that this is a bug (normal behavior).  The timing of finding this issue right after the Toolbox reset had me convinced that something was broken and sent me on a wild goose chase.  You got me back on the right track.

    Issue and solution:

    1. Label Control – This control will always resize if docked or is contained by a control that is docked.  The solution was to set the AutoResize property to false.
    2. TextBox, MaskedTextBox and NumericUpDown control – These controls cause .resx to change if they their dock property is set to other than None, Top, or Bottom.  The solution was to put them in a sub panel that allows them to be Top or Bottom docked.

    Thanks again for all the help.  I really appreciate it.

    Friday, December 2, 2016 5:22 PM
  • Hi Rob Remke,

    Thanks for sharing your solution here. Please mark your reply as answer which is benefit to other communities who has the same issue.

    If any questions in future about Visual Studio IDE, please feel free to come back to our forum.

    Best Regards,
    Weiwei


    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.

    Monday, December 5, 2016 1:33 AM
    Moderator