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).
Microsoft AccessMicrosoft ExcelMicrosoft Office
Last Comment
Dale Fye
8/22/2022 - Mon
Nick67
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?
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?