Link to home
Start Free TrialLog in
Avatar of nickmar
nickmar

asked on

** 100 Pts - How change ico of my DLL?

My DLL has no form - nor wish to add one.
How can I make it appear with my icon instead of the
standard's VB icon?
My DLL has only functions and subs inside and I don't
really wish to add a form or anything..
Avatar of AzraSound
AzraSound
Flag of United States of America image

I think the icon you are referring to is the standard Windows icon denoting a *.dll file.  I don't think you can change that simply as with exe files.
Avatar of JohnYounger
JohnYounger

Put a blank, unused, unloaded form in your DLL code and give it an icon. Make that the icon for the project.
You don't need to even load the form at all in your DLL, it is only there to provide the icon.
if you aretalking about to change the Icon seen in Windows Explorer view then it is not possible unless you change it from tools\options
or else insert the form and set project icon to Form1
Hey, my answer works.
What's the problem ?
I tried the method you mentioned JohnYounger, with a new ActiveX DLL project, added a blank form, compiled, and it still shows the default Windows icon for a *.dll file.
ASKER CERTIFIED SOLUTION
Avatar of amkarambelkar
amkarambelkar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nickmar

ASKER

AzraSound catch my answer before I give it away..

Hmmm, uh, what exactly is doing this registry setting?
(I'm a bit reluctant to change registry values..)
However, as an idea seems good..
I know certain items have a DefaultIcon that determines the icon for the item, but this usually pertains to ActiveX (EXE) servers, or true Windows executables.  I searched the registry for an ActiveX DLL with a DefaultIcon registry value and found one, but if you find the DLL in Windows Explorer, it still shows the default Windows icon for a DLL file.  I have never tried the above method, but all I can suggest if you want to try it, is to export that key first, alter the key, and see if it works.  If it doesn't, you can always reimport that key to restore it to what it was before.
Avatar of nickmar

ASKER

Ok, let me then try this one amkarambelkar is suggesting..
Avatar of nickmar

ASKER

Still same old plain VB icon..
Any ideas? maybe I did something wrong?..
>>Still same old plain VB icon

Do you mean, still same old Windows dll icon?  I don't think you will get Windows Explorer to show anything else for a DLL unless you change it for ALL DLLs.
Avatar of nickmar

ASKER

(JohnYounger, problem is that, one of my DLLs has been already given away, so I can't recompile nor I can, in customer's machine.. sorry.. your idea was my first intention..)

Yeap, AzraSound you're right, it actually changes for all dlls..
I ditn't got anything with that change (amkarambelkar) are you sure value is correct? (I've checked twice my hex input..) any other trick maybe?
it is obvious that the change in registry setting will affect for all files of that type
but otherwise i don't think there is provision to change the icon of single Dll
if you go for John Younger's comment that also not show the icon of form after Making of *.dll
because Dll is In-Proc server and is made to run in background so no question of visibility of icon
ofcourse you can have icon for forms and other components inside Dll
but you can not assign the Icon as that of Compiled EXE
Avatar of nickmar

ASKER

amkarambelkar you're right, it's inproc so I think I've lost focus with this subject..
I think you provided valuable information, so for this..
THANK YOU !!
:)
AzraSound/JohnYounger, thank you as well..
Avatar of nickmar

ASKER

In-depth setting, thank you for sharing :)