469,590 Members | 2,171 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,590 developers. It's quick & easy.

ImageList & Win98

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
__________________________________________________ ___
Nov 21 '05 #1
1 1120
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
__________________________________________________ ___
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by thinkfirst | last post: by
4 posts views Thread by - Dazed | last post: by
reply views Thread by Macadair | last post: by
reply views Thread by Dave Harris | last post: by
1 post views Thread by John Devlon | last post: by
reply views Thread by Phil Stanton | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.