문제

I changed the icon of my VB.net program and now it is throwing errors.

I get this error when I try run the program:

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

and it won't let me back into the designer to try and restore the original icon. It shows a page with this message on the Ford Design page:

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

Any suggestions? At this point I just want to figure out how to restore the old icon and get going on my program again!

도움이 되었습니까?

해결책

Try

Remove the line Me.Icon = .... 

In order to add new icon just go to your designer on properties window and add the icon you want.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top