Hello,
I created an application (Windows Forms) with a form and an imagelist.
Everything works fine under WinXP, but when I try to start the app on
Win98, the following error is returned:
Quote:
System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. ---> System
InvalidOperationException: Failed to load ImageList.
at System.Windows.Forms.ImageListStreamer..ctor(Seria lizationInfo info,
StreamingContext context)
--- End of inner exception stack trace ---
at System.Reflection.RuntimeConstructorInfo.Serializa tionInvoke(Object
target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager
CompleteISerializableObject(Object obj, SerializationInfo info,
StreamingContext context)
at System.Runtime.Serialization.ObjectManager
FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixup s()
at System.Runtime.Serialization.Formatters.Binary.Obj ectReader
Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter
Deserialize(Stream serializationStream, HeaderHandler handler, Boolean
fCheck, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter
Deserialize(Stream serializationStream)
at System.Resources.ResourceReader.LoadObject(Int32 pos)
at System.Resources.RuntimeResourceSet.GetObject(Stri ng key, Boolean
ignoreCase)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo
culture)
at System.Resources.ResourceManager.GetObject(String name)
at KBS.fmControlePermiss.InitializeComponent()
at KBS.fmControlePermiss..ctor()
at KBS.fmGrupo.Button3Click(Object sender, EventArgs e)
The problematic line is:
Me.imageList1.ImageStream = _
CType(resources.GetObject("imageList1.ImageStream" ), _
System.Windows.Forms.ImageListStreamer)
It's a #develop project. How to prevent this?
Thanks in advance,
Stefan
--
___________________________________www.VBTricks.de .vu
the free resource for Visual Basic, Gambas and Pascal
components, tips & complete projects
www: http://www.VBTricks.de.vu
mail: vbtricks <at> gmx <dot> net
__________________________________________________ ___