Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2007

Tip: Looking for answers? Try searching our database.

Desperate! "Parameter must be of type Image"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pasavvas.accounts@googlemail.com - 20 Jun 2007 12:11 GMT
Hi all,

I am really frustrated with this.. I have been trying to sort this for
2 days now. Please help!

I am currently porting a .NET 1.1 project to 2.0

this a cf project which gets images dynamically from a resource file.
But under VS2005 I get the following error:

"Parameter must be of type Image"

here is the code:

Friend WithEvents imgStatus As System.Windows.Forms.ImageList
....
Me.imgStatus.Images.Add(CType(resources.GetObject("resource"),
System.Drawing.Image))
Me.imgStatus.Images.Add(CType(resources.GetObject("resource1"),
System.Drawing.Image))
Me.imgStatus.Images.Add(CType(resources.GetObject("resource2"),
System.Drawing.Image))
Me.imgStatus.Images.Add(CType(resources.GetObject("resource3"),
System.Drawing.Image))
Me.imgStatus.ImageSize =
CType(resources.GetObject("imgStatus.ImageSize"), System.Drawing.Size)

and here is the resource entry:

<data name="resource3" type="System.Drawing.Bitmap, System.CF.Drawing,
Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Qk12AgAAAAAAAHYAAAAoAAAAIAAAACAAAAABAAQAAAAAAAAAAAASCwAAEgsAABAAAAAQAAAASkpK/
2tr
       a/+MjIz/ra2t/
8bGxv8AAP///////////////////////////////////////////////////////
xAA......ommited....MzMzMzMzMzMzMzMy
</value>
pasavvas.accounts@googlemail.com - 20 Jun 2007 12:14 GMT
> Hi all,
>
[quoted text clipped - 35 lines]
> xAA......ommited....MzMzMzMzMzMzMzMy
> </value>

I am pretty sure it has to do with the CF.NET specific data tag, but
how do I convert this?
pasavvas.accounts@googlemail.com - 20 Jun 2007 15:27 GMT
> > Hi all,
>
[quoted text clipped - 38 lines]
> I am pretty sure it has to do with the CF.NET specific data tag, but
> how do I convert this?

Clarification: How do I convert this across the board automatically
and with something other than the VS2005 upgrade wizard.

Thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.