我重置了VS2013 ToolBox,并且某些控件的行为异常 [英] I Reset my VS2013 ToolBox and some controls behave strangely

查看:133
本文介绍了我重置了VS2013 ToolBox,并且某些控件的行为异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天,我在VS2013中重置了我的工具箱.现在,在Visual Basic项目中,包含停靠的Label控件或包含在停靠的另一个控件中的任何表单都会导致其表单.resx和设计器文件在生成时重新生成 该项目已加载.即使没有进行任何更改,这也迫使我在退出时进行了保存.对于TextBox和MaskedTextBox控件也是如此.加载或关闭项目时,控件也会频繁闪烁(例如正在重新绘制它们) 一遍又一遍).

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).

如果将Dock属性设置为无",则将对于这些控件,包含表单的.resx文件和设计器文件在启动时不会重新生成.

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.

我的PC上安装了VS 2008、2010、2013和2015.现在,所有这些都发生了.

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.

所有Visual Studio版本都共享工具箱吗?我该如何纠正?任何帮助,我们将不胜感激.

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

谢谢.

推荐答案

罗布·雷姆克,

Hi Rob Remke,

根据您的描述,我在Visual Studio 2013和Visual Studio 2015中都进行了测试.它们都存在此问题.而且我发现,即使不重置我的工具箱,WinForm应用程序也存在此问题.所以恐怕这是默认的 Visual Studio中WinForm应用程序的操作.

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.

我也找到了解决此问题的方法.当我更改Docked控件的Anchor属性并保存更改时,如果我重新打开该项目,则窗体设计器将不会显示为已更改.您可以将Anchor属性更改为任何值,甚至 更改->保存,然后将其更改回默认值并保存.

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.

因此,您有两种选择,一种是忽略表单上的更改图标,因为它实际上并未更改任何内容.另一个是更改Docked控件的Anchor属性并保存.然后它将不会在该表单上显示更改后的图标.

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.

最好的问候,
Weiwei

Best Regards,
Weiwei


这篇关于我重置了VS2013 ToolBox,并且某些控件的行为异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆