ImageList & Win98

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • VBTricks.de.vu Webmaster

    #1

    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.Reflecti on.TargetInvoca tionException: Exception
    has been thrown by the target of an invocation. ---> System
    InvalidOperatio nException: Failed to load ImageList.
    at System.Windows. Forms.ImageList Streamer..ctor( SerializationIn fo info,
    StreamingContex t context)
    --- End of inner exception stack trace ---
    at System.Reflecti on.RuntimeConst ructorInfo.Seri alizationInvoke (Object
    target, SerializationIn fo info, StreamingContex t context)
    at System.Runtime. Serialization.O bjectManager
    CompleteISerial izableObject(Ob ject obj, SerializationIn fo info,
    StreamingContex t context)
    at System.Runtime. Serialization.O bjectManager
    FixupSpecialObj ect(ObjectHolde r holder)
    at System.Runtime. Serialization.O bjectManager.Do Fixups()
    at System.Runtime. Serialization.F ormatters.Binar y.ObjectReader
    Deserialize(Hea derHandler handler, __BinaryParser serParser, Boolean fCheck,
    IMethodCallMess age methodCallMessa ge)
    at System.Runtime. Serialization.F ormatters.Binar y.BinaryFormatt er
    Deserialize(Str eam serializationSt ream, HeaderHandler handler, Boolean
    fCheck, IMethodCallMess age methodCallMessa ge)
    at System.Runtime. Serialization.F ormatters.Binar y.BinaryFormatt er
    Deserialize(Str eam serializationSt ream)
    at System.Resource s.ResourceReade r.LoadObject(In t32 pos)
    at System.Resource s.RuntimeResour ceSet.GetObject (String key, Boolean
    ignoreCase)
    at System.Resource s.ResourceManag er.GetObject(St ring name, CultureInfo
    culture)
    at System.Resource s.ResourceManag er.GetObject(St ring name)
    at KBS.fmControleP ermiss.Initiali zeComponent()
    at KBS.fmControleP ermiss..ctor()
    at KBS.fmGrupo.But ton3Click(Objec t sender, EventArgs e)


    The problematic line is:

    Me.imageList1.I mageStream = _
    CType(resources .GetObject("ima geList1.ImageSt ream"), _
    System.Windows. Forms.ImageList Streamer)


    It's a #develop project. How to prevent this?


    Thanks in advance,

    Stefan
    --
    _______________ _______________ _____www.VBTric ks.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
    _______________ _______________ _______________ ________
  • VBTricks.de.vu Webmaster

    #2
    Re: ImageList &amp; Win98

    Hello,

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

    Thanks anyway,

    Stefan

    --
    _______________ _______________ _____www.VBTric ks.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
    _______________ _______________ _______________ ________

    Comment

    Working...