Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

Icons & ActiveX Dlls

Is it possible to retrieve an Icon from and ActiveX DLL (I know its possible from an ActiveX EXE, but using the standard methods (see Q185883 on MSDN) using ExtractIcon API I cant get any icons. I have written an ActiveX Dll and specified an icon for it in the project properties page, but ExctactIcon draws a blank.
Anybody succesfully done this in the past, or is VB just conning me by letting me specify an icon for the DLL ?
0
paulstamp
Asked:
paulstamp
  • 3
  • 3
  • 2
  • +1
1 Solution
 
MTroutwineCommented:
Go to vbAccelerator at http://www.vbaccelerator.com/ do a search on Icon Extractor.  You will find an Icon Extractor utility that will extract Icons from DLLs and EXEs.  It also comes with the source code!
0
 
MTroutwineCommented:
You can also just download the file directly from this URL.  By the way this is free the code and application are free!

vbaccelerator.com/codelib/gfx/iconex6.zip

0
 
Erick37Commented:
In order to add icons to a DLL, you must add a resource file to the project.  The Resource Editor Add-In will allow you to do this.  Once the resource file is part of the project, add as many icons as you wish.  ExtractIcon() will then work with your DLL.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
paulstampAuthor Commented:
The Icon Extractor program will not extract the icon from an ActiveX DLL, however Erick37's suggestion about using a resource file does solve the problem.

Cheers Erick
0
 
olly_georgeCommented:
ExtractIcon will work with your DLL if the icons are part of a resource file, added to the project.
0
 
paulstampAuthor Commented:
Thanks, although Erick37 also came up with the same solution
0
 
Erick37Commented:
That's funny.
Olly got the points.
0
 
paulstampAuthor Commented:
Sorry... dont know how to give points except in response to a direct answer. Is there a way of doing that ?
0
 
Erick37Commented:
Not a problem.
I think there is an "Accept Comment as Answer" option on the comment bars.  But I think you have to reject any pending answers first.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now