Wil van Antwerpen 25 Posted November 21, 2021 Hi, I wrote an ActiveX component with Delphi 10.4.2 and the users are happy with it. There's lots of legacy software out there and this helps them. One of the things I am looking into now is how-to add an icon for using it in other development tools. On the toolbox pane in VB6 it shows up as a black square now and that's not very ideal. See below: From what I've found so far, it has to be an image of 16x15 pixels and only 16 colors (oh dear). Hopefully one can add higher resolutions as well for other environments. There was also some mention of adding it as resource (.dcr) file, which I tried, but so far, no cigar. Somehow I'm not finding much details on this. LOL Ideas welcome, maybe someone down here remembers and is willing to share that tidbit. Thanks. Share this post Link to post
Anders Melander 1783 Posted November 21, 2021 https://docs.microsoft.com/en-us/windows/win32/com/activex-controls-registry-information You can add the 16x15 bitmap to your Delphi project using Project > Resources and Images. Searching the Delphi source for "ToolboxBitmap32" I can see that TActiveXControlFactory has a ToolboxBitmapID property which you can use to specify the resource ID of the bitmap. The value of this property is written to the registry when the ActiveX control is registered. 3 hours ago, Wil van Antwerpen said: There was also some mention of adding it as resource (.dcr) file, which I tried, but so far, no cigar. A .dcr file usually just contains the Delphi design time glyph of a component - I.e. the glyph you see on the component palette in Delphi. It has nothing to do with ActiveX controls. 1 1 Share this post Link to post
Wil van Antwerpen 25 Posted November 21, 2021 Thanks! That does indeed look like it was the missing piece of information that I need. Share this post Link to post