我更改了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.
它不会让我回到设计师尝试恢复原始图标。它在Ford Design页面上显示了包含此消息的页面:
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
并重新开始我的程序!
答案 0 :(得分:1)
尝试
Remove the line Me.Icon = ....
要添加新图标,只需在属性窗口中转到设计器并添加所需的图标。