设计模式下VS2012中的问题 [英] problem in VS2012 in the design mode

查看:152
本文介绍了设计模式下VS2012中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚安,我需要这个问题的帮助

我使用这个proyect(dll)
自定义ProgressBar控件 [

good night i need help for this problem

i use this proyect (dll)
Custom ProgressBar Control[^]
he work perfectly in vs2010 (0 error,0warnings,etc)

but in the VS 2012 i get this errors.... (only in the design mode)

Message 3 Object of type 'System.Int32' cannot be converted to type 'System.Int16'.  0 0 

Message 8 The variable 'ProgBarPlus1' is either undeclared or was never assigned. C:\Users\carloseduardo\Documents\Visual Studio 2012\Projects\Proyecto FDT\nuevo FDT con bass.dll\Facilitador de Tareas\Facilitador de Tareas\Form1.Designer.vb 2139 0 

Message 9 Duplicate declaration of member 'ProgBarPlus1'  0 0 

Message 14 Duplicate declaration of member 'ProgBarPlus3'  0 0 


en System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
en System.ComponentModel.ReflectPropertyDescriptor.ResetValue(Object component)
en System.ComponentModel.Design.Serialization.CodeDomSerializer.ResetBrowsableProperties(Object instance)
en System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
en System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
en System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statement



:''(如果我能完美地编译他,我需要帮助(确保设计器vs2012中的错误都是假的.



:''( i need help if i compile he work perfectly ( im sure the error in the designer vs2012 is all fakes

推荐答案

第一个错误,基本上是你正在尝试将精度较高的变量转换为精度不允许较低的变量,这是直接不允许的.

其他错误表明变量重复.

我建议与文章作者联系以解决代码中的问题,或者修改代码以消除错误.

如果您决定自己解决问题,请研究本文中的代码,并尝试查明问题所在.

当您将该自定义控件添加到窗体时,将运行自定义控件中的代码,因此这就是您在设计期间遇到错误的原因.要查明确切的位置,请使用调试器和/或利用System.Diagnostics.Debug.WriteLine方法从控件内部获取更多信息.
With the first error, basically you''re trying to convert a variable with larger precision to a variable with smaller precision which isn''t allowed directly.

The other errors indicate a duplicate variable.

I would suggest either contacting the author of the article to resolve the problem in the code or to modify the code to get rid of the errors.

If you decide to solve it by yourself, then investigate the code from the article and try to pinpoint the location of the problem.

When you add that custom control to your form, the code in the custom control is ran so this is why you''re facing the errors during the design time. To pinpoint the exact locatin, use the debugger and/or utilize the System.Diagnostics.Debug.WriteLine method to get more information from inside of the control.


修复程序已在作者链接中上传: )通过MSDN和SOftjaen进行修复
fix uploaded in the author link :) thx MSDN and SOftjaen for the fix


这篇关于设计模式下VS2012中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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