0

我更改了VB.net程序的图标,现在它正在抛出错误。

当我尝试运行程序时出现此错误:

An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll  Additional information: Exception has been thrown by the target of an invocation.

它不会让我回到设计器中尝试恢复原始图标。它在福特设计页面上显示带有此消息的页面:

To prevent possible data loss before loading the designer, the following errors must be resolved: 

The parameter is incorrect 
Instances of this error (1)  
at System.Drawing.Icon.Initialize(Int32 width, Int32 height)
at System.Drawing.Icon..ctor(Stream stream, Int32 width, Int32 height)
at System.Drawing.Icon..ctor(Stream stream)
at System.Drawing.IconConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfoculture, Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
at System.Resources.ResXDataNode.GenerateObjectFromDataNodeInfo(DataNodeInfo dataNodeInfo, ITypeResolutionService typeResolver)
at System.Resources.ResXDataNode.GetValue(ITypeResolutionService typeResolver)
at System.Resources.ResXResourceReader.ParseDataNode(XmlTextReader reader, Boolean isMetaData)
at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader)`

有什么建议么?在这一点上,我只想弄清楚如何恢复old icon并再次开始我的程序!

4

1 回答 1

1

尝试

Remove the line Me.Icon = .... 

为了添加新图标,只需在属性窗口中转到您的设计器并添加您想要的图标。

于 2013-06-26T20:58:59.897 回答