Error When Adding an .ico file to the "Image" Property of a PictureBox Control

H

Herfried K. Wagner [MVP]

T

T-Man

Hey Herfried,

Nope. The file inserts fine into VB6.

Just can't get it to work in .Net.

Regards,

T-Man
 
H

Herfried K. Wagner [MVP]

T-Man said:
Nope. The file inserts fine into VB6.

Just can't get it to work in .Net.

Maybe VB6 is more tolerant. Nevertheless, I'd try to assign another icon
file in order to be able to make sure that it's not a problem of your .NET
installation.
 
T

T-Man

Hey Herfried,

Interesting.

I just placed an icon from the VS6 Common files without incident. Whewwww!

At least we know it is not my .Net installation.

Must be something's wrong with the .ico file. For some reason VB6 accepts
it but .Net does not.

Perhaps I should just have the graphics designer rebuild it and make sure
that it loads properly in .Net.

That is, unless, you have some other workaround? ;-)

Thanks for the assistance.

Regards,

Todd
 
H

Herfried K. Wagner [MVP]

T-Man said:
I just placed an icon from the VS6 Common files without incident.
Whewwww!

At least we know it is not my .Net installation.

Must be something's wrong with the .ico file. For some reason VB6 accepts
it but .Net does not.

Perhaps I should just have the graphics designer rebuild it and make sure
that it loads properly in .Net.

That is, unless, you have some other workaround? ;-)

The way you are describing is the way I would have suggested. I am curoius
if that fixes your problem.
 
G

Guest

I experienced the exact same problem and error message.
Although in my case I was using the ResEditor tool to edit
an image resource file (.resx), anyhow,

Use the built-in VS.NET icon editor to either re-create the icon from
scratch,

-or-

simply open the existing icon direclty in VS.NET by doing:
Add Existing Item->(pick your .ico file)
Open the icon and make some trivial change then save it.

Can't remember which one of those I did, sorry,
but i did see that same error, and using the Icon Editing
tool in VS.NET was part of the solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top