1

I just moved from Delphi 7 to 10.3 and was trying to install some of my older (VCL) custom components. I was finally successful in getting the code to compile, but I'm having trouble with something that seems like it should be trivial. The icons for the custom component(s) in the palette show what looks like a default icon instead of the icon(s) I expected. There are lots of posts on here (most are over 5 yrs old) about component icon issues and I've tried self-compiling the .rc file, including the{ $R .rc} in the package source and using the Project/Resources and Images dialog to specify the icons. I've tried 8-bit, 16-bit, 24-bit icons that are 24x24. Then as a test, I followed the exact procedure shown here which included some of the more recent content on this issue that I could find. I tried with bitmap files at full resolution and 32bpp and 24x24 at 8bpp. In both cases, the default icon showed for this test component. I'm probably overlooking something simple, but I'm kind of at a loss on what to try next. Is there a different procedure for specifying icons for custom components in 10.3 compared to older versions?

Edit: An update - I reinstalled my custom component and then rebooted and then was able to see the correct icon reflected in the palette, but here's where it gets strange. The test component I linked above still shows a default icon even after reinstalling and rebooting, and even stranger, is that the second I use my custom component on a form, the icon in the palette reverts to a TEdit icon (the component is a descendant of TEdit). Closing Delphi and reopening restores the icon until it is used again.

Jammer13
  • 21
  • 5
  • Nothing has changed over the years regarding HOW icons are associated with components. The only thing that has changed is new support for additional image formats has been added (16x16, 24x24, 32x32, 24bit, PNG, etc). But the core steps are still the same, just with different resource names for the various formats. It would help if you would explain, in detail, step-by-step, exactly what you are doing. – Remy Lebeau Apr 26 '20 at 04:43
  • @Remy, thanks for info. I had seen a blog post that the icons were "upgraded" in 10.2.2. Regarding steps, I followed the test procedure shown in the link (bike icon) in my post exactly (using the resource and images dialog under Project) except I tried it two ways. One, with the icon as full resolution and 16bpp and then again with 24x24 at 8bpp. Both attempts with same unsuccessful result. I edited original post to include more info on behavior and if nobody else is seeing this, I have to assume that it is some sort of configuration issue with my install/machine. – Jammer13 Apr 26 '20 at 15:43

1 Answers1

1

I'm not sure whether I should answer my own question, but just wanted to update in case it helps someone later. I was finally able to get the sample test component icon to show by using the -nocache option as described here. I then cleared the registry cache for my own component (dclusr) as shown in the same post and then also changed the bitmaps from 8bpp to 32bpp and now everything seems to be working as expected. I then cleared the registry keys for the sample project, and I can run without the -nocache option and all icons show fine, so I am thinking it was mostly a cache issue which I never would have found without the referenced post.

Jammer13
  • 21
  • 5