Error on 2003 SE Help!

  • Thread starter Thread starter STI_PDA
  • Start date Start date
S

STI_PDA

I have an application that runs perfectly until I try it
on a new device (iPAQ rx3700 which is using Second
Edition of Windows Mobile 2003). I've traced it to the
part of code that is adding images to my imagelist.
(this imagelist is attached to my toolbar)
System.IO.Stream st = System.IO.File.Open(mIconPath +
"Syncon.ico",System.IO.FileMode.Open);
System.Drawing.Icon icon = new System.Drawing.Icon(st);
imageList1.Images.Add(icon); <-- error on this line
The error information I received is:
System.InvalidCastException; System.Drawing.Dll.
I'm using CE .NET v1.1
 
Thanks Daniel,
this helped me get a step closer to reality. I'm now up-
to-date with the service packs. The device reports
1.0.4292.0 which is SP3 and I'm still getting the same
error.
Note: the error actually occured on the line
System.Drawing.Icon icon = new System.Drawing.Icon(st);
Thanks for any help. I'm still researching what changed
with the Second Edition.
 
Back
Top