LoadPicture error with icon files

I'm completing an Access add-in which provides a visual interface for creating shortcut menus.

I am using the LoadPicture method to load image files into the Picture property of shortcut menu controls and this works great for jpg, bmp, and gif files, but not with icon files.  Every question I've looked at on all of the various on-line forums indicates that icon files in 16x16 or 32x32 are acceptable with True Colors or 256 color attributes, but every icon file I try to upload fails and raises an undocumented error (#-2140724809).
LVL 50
Dale FyeAsked:
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.

Nick67Commented:
For giggles.
Rename the .ico file to .bmp or to .jpg.
Will it load?
Image support has varied greatly over the years with Access.
Go far enough back and only .bmp was usuable.
Sometimes, without the old Office Picture Manager installed, that was even the case in A2003.

I haven't tried loading an icon file with WIA yet.
It certainly can get done via WinAPI.
Have you tried the simple stuff first?
0
Nick67Commented:
What you may be hitting too is an .ico file with multiple sizes rolled in.
Those may not play nice with Access
http://icoconvert.com/Multi_Image_to_one_icon/
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
I would seriously look at Gunter's Ribbon Creator code ... he had help from other peeps with the image stuff.
Pretty sure your answer is there. Loads ICO's and all other image types with no issue.
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Dale FyeAuthor Commented:
Still looking into this.
0
Martin LissOlder than dirtCommented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
Dale FyeAuthor Commented:
Thanks for the help on this, Joe.
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
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.