Thank you for your reply.
I tried assigning the icon hanlde directly but get an error 13 'Type
mismatch'.
The code I used was:
hInst = GetWindowLong(Application.hWndAccessApp, GWL_HINSTANCE)
str = "c:\program files\microsoft office\office\excel.exe"
hIcon = ExtractIcon(hInst, str, CLng(0))
Set x = ctlImg.ListImages.Add(, "excel", hIcon)
Apologies if I am being a bit slow here...
The above is in Access97 vba.
> Why do you not simply assign the Icon handle returned by your call to
> ExtractIcon directly to the Add method of your ImageList control?
[quoted text clipped - 32 lines]
> >
> > Any help much appreciated.
Stephen Lebans - 24 Aug 2004 00:43 GMT
Can you send me your MDB so I can have a look at it. It would be a lot
easier than me trying to recreate your issue from scratch.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
> Thank you for your reply.
>
[quoted text clipped - 51 lines]
> > >
> > > Any help much appreciated.
Stephen Lebans - 25 Aug 2004 00:52 GMT
I've modified your code to work. Over in VB land there was code to
convert a handle to an Icon to a StdPicture object which is the format
used by the ImageList control. Modified code was emailed to you tonight.
:-)
Good luck.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
> Can you send me your MDB so I can have a look at it. It would be a lot
> easier than me trying to recreate your issue from scratch.
[quoted text clipped - 67 lines]
> > > >
> > > > Any help much appreciated.
Ruggero - 25 Aug 2004 07:45 GMT
Perfect.
Thank you for all all your help.
> I've modified your code to work. Over in VB land there was code to
> convert a handle to an Icon to a StdPicture object which is the format
[quoted text clipped - 81 lines]
> > > > >
> > > > > Any help much appreciated.