Insert an Icon in my VB6 application and gives "unexpected error"

I have a VB6 apps and tried to insert an Icon via the properties window and got  "unexpected error".

I converted the Icon from PNG format.  Prior conversion the PNG properties is:

24-bit RGB color
Width 75 pixels (0.50 inches)
Height 75 pixels (0.50 inches)
Resolution 150
Image size on disk 16kb

rayluvsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nasserdCommented:
The source image does not matter... it is the resulting icon image which is causing the error to be thrown (of course, "unexpected error" is not a helpful error message).

Make sure the latest service packs are installed and icon support is typically limited to the compatibility between VB IDE and Windows.

Compatible ICO's are typically 8 bit images you can freely edit in MS Paint.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stevepicksCommented:
0
rayluvsAuthor Commented:
Unfortunately non worked.  

I found this site http://converticon.com/ to also convert and nothing.  I used an icon from stevepicks link and copied my image there and converted back to ICO, nothing.

Am I missing something?
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

danaseamanCommented:
Can you attach the png and ico files so that we can take a look?
Here is an example of how to attach an Ico (including 32-bit) to your project:

Providing a proper VB Application Icon, Including Large Icons and 32-Bit Alpha Image
http://www.vbaccelerator.com/home/vb/tips/setting_the_app_icon_correctly/article.asp

Note that 32-bit icons will not display properly in IDE but will when compiled to Exe.
0
rayluvsAuthor Commented:
Attached is the JPG we want to change.  Unfortunately, the upload does not permit me to upload ICO files.  So here is the JPG version
oS.Icon.jpg
0
rayluvsAuthor Commented:
I went thu your link, its kinda complicate for just setting the Icon, but we'll keep trying
0
danaseamanCommented:
Converted Jpg to 24-bit Ico with Axialis and it loads in Vb6 Form OK here.
Download Ico here:
http://www.mediafire.com/file/ljj3cdmnunw/oS.ico

0
rayluvsAuthor Commented:
Error: Invalid Picture (and I using a fresh new project just in case)

The thing is we did this a couple of month back with no problem....
0
danaseamanCommented:
What OS are you using and what is OS Color depth?
Here is same Icon as 8-bit (256 Color).
http://www.mediafire.com/file/yjjmncmmhmn/oS256Colors.ico


FormOSIcon256.png
0
rayluvsAuthor Commented:
Windows XP Pro Sp2

I download yout ICO, still "Invalid Picture"



0
danaseamanCommented:
Definitely something wrong with your system.
Try installing Vb6-Sp6 to see if that helps:
Service Pack 6 for Visual Basic 6.0
http://www.microsoft.com/downloads/details.aspx?FamilyID=9EF9BF70-DFE1-42A1-A4C8-39718C7E381D&displaylang=en


0
rayluvsAuthor Commented:
I already have the SP6

Yes thats what I think.  But the thing is that current ICO I can import, but ones I create, doesnt' work.

So is something I do
0
rayluvsAuthor Commented:
prior to
0
danaseamanCommented:
The 2 icons I sent were made with with Axialis so I am sure they are OK and they both work  on my machine. I think there is something wrong with your Vb6 installation. Wouldn't hurt to try to reinstall SP6 to see if that corrects the problem. Reinstalling Vb6 from scratch is also fairly quick.  
0
rayluvsAuthor Commented:
the thing is that present ICO worked

Let me send you one that works and can u review it to see its structure?

I cant seem to send the ICO....is there way I can send it to u?
0
danaseamanCommented:
If the Icons I sent don't work there then there must be something wrong with your Vb6 installation, otherwise why are they working here.
0
rayluvsAuthor Commented:
Ok...let me try reinstall SP6
0
rayluvsAuthor Commented:
Its not SP6.  I found out why my previous programmer icon worked.  He used an application called "Any to Icon" and I ran it and it worked excellently.
0
rayluvsAuthor Commented:
I don't how this works, but you've been very patience with us and helped a lot, so we'll give you the points.
0
rayluvsAuthor Commented:
Thanx to all
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.