I have a C# WinForms project whose main form includes an ImageList, linked
to a Toolbar, and I'm running it in Debug mode.  Sometimes, it works
completely.  However, I intermittently get a System.Argument exception,
with additional information 'Stream is not a valid resource file!' on this
line from InitializeComponent():
this.imlImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)
(resources.GetObject("imlImageList.ImageStream")));

There shouldn't be an issue with versions of the resource file format.
I've been using VS.NET Beta 2 throughout the development cycle.

I have found a work-around:  if I remove one of the images from the
ImageList, then re-add it, then rebuild the solution, it always works for
at least one execution.  However, this is really annoying.

Is there an actual fix to this problem?

Bill

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to