ImageList & Win98

  • Thread starter VBTricks.de.vu Webmaster
  • Start date
V

VBTricks.de.vu Webmaster

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(SerializationInfo info,
StreamingContext context)
--- End of inner exception stack trace ---
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(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.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader
Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
Deserialize(Stream serializationStream, HeaderHandler handler, Boolean
fCheck, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
Deserialize(Stream serializationStream)
at System.Resources.ResourceReader.LoadObject(Int32 pos)
at System.Resources.RuntimeResourceSet.GetObject(String 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
_____________________________________________________
 
V

VBTricks.de.vu Webmaster

Hello,

there seems to be no other way than to add the images manually from a
resource.

Thanks anyway,

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
_____________________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top