Link to home
Start Free TrialLog in
Avatar of JLANE
JLANE

asked on

How do I add an icon to an ActiveX control in Delphi?


Should be easy for someone who knows:

How do I change the icon image for an ActiveX control that I am trying to build in Delphi 5?

By default it comes up as those funny 3d shapes.

I know how to do it when creating custom VCL components (ie you create the .dcr file using image editor), but it doesn't seem to work on ActiveX components.

Avatar of Epsylon
Epsylon

- Start Delphi's image editor.
- Create a new dcr-file.
- Add a new 24x24 Bitmap to the content.
- The name should be like TMyActiveX
- Edit the image
- Save it with the same name as the .pas file except that it must be .dcr now.
Forget the above. When you import the ActiveX Control into delphi, the .dcr file is created automatically in the imports directory. Just edit that one.

(Delphi 5)
Avatar of JLANE

ASKER

Epsylon:
I don't really want to ask all of my customers to edit the icon every time they import my activex control! Anyway, this doesn't work for VB users etc.

There must be a simple way to change the icon that is compiled into the .ocx file.
ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

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 JLANE

ASKER

Don't know why it didn't work the first 10 times I tried.

Maybe the Build All...