tag:blogger.com,1999:blog-1077468864044303325.post6275869690861779039..comments2024-03-20T18:47:57.268+02:00Comments on Behind the connection: HowTo: Create a DCR file for your Delphi componentFPiettehttp://www.blogger.com/profile/08260455911271500004noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-1077468864044303325.post-61296308191592802592022-03-07T12:29:00.684+02:002022-03-07T12:29:00.684+02:00I was getting mad trying to do this simple thing i...I was getting mad trying to do this simple thing in Delphi 2010. No help found on Delphi Help file.<br /><br />Thank you for the ideas given in this post for other versions of Delphi.<br /><br />In Delphi 2010, you need to:<br />· Create a 24x24 pixels bitmap using Windows Paint i.ex. (I could create a 24-bits bitmap). Store it in any location of your package project.<br />· Activating package Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-51583112911198874382017-07-24T08:38:55.825+02:002017-07-24T08:38:55.825+02:00>>However, it is suitable to design the comp...>>However, it is suitable to design the component icons in 32x32 pixel @ 24Bit colour.<br /><br />I just tried this new method with Delphi XE4 and a bitmap as described above and it works fine! Much better than DCR capability.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-59936468207678904442016-09-11T00:45:36.297+02:002016-09-11T00:45:36.297+02:00A little background info:
François method works bu...<b>A little background info:</b><br />François method works but that is not the method RAD Studio/Delphi is planned to use today.<br />The DCR was restricted to 256 color palette, that is if you want to compile a 24Bit image into your DCR you'll get an error “Invalid bitmap format”.<br />And usually when changing your components tools palette icon you do not see the change in the tools Anonymoushttps://www.blogger.com/profile/03797114095140156712noreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-39374208346725792302015-11-14T10:07:54.309+02:002015-11-14T10:07:54.309+02:00Actually, the way you can do it is
- select the &...Actually, the way you can do it is <br />- select the "Project" menu<br />- select "Resources and Images". <br />- Click the "Add" button in the dialog box. <br />- Select the file you want and click "ok".<br />- Set the Resource Identifier as the Component name.<br />- Click "OK".<br /><br />I have done this in Delphi 10 Seattle, and from what Geoffhttps://www.blogger.com/profile/04783689358216682426noreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-33562257891822005432014-10-29T18:36:49.510+02:002014-10-29T18:36:49.510+02:00Excellent works fine in XE7 :)Excellent works fine in XE7 :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-910281783030980582014-02-23T20:19:35.114+02:002014-02-23T20:19:35.114+02:00Jaenicke, does it works for you? It doesn't fo...Jaenicke, does it works for you? It doesn't for me with XE5 upd2.FPiettehttps://www.blogger.com/profile/08260455911271500004noreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-61636967324976556062014-02-23T17:53:22.440+02:002014-02-23T17:53:22.440+02:00Why do you suggest to use the command line resourc...Why do you suggest to use the command line resource compiler?<br /><br />Better is to use the built-in compiler of Delphi, so you just write in the unit of the component:<br />{$R 'DemoComponent.dcr' 'DemoComponent.rc'}<br /><br />So you only have to:<br />- create the image file<br />- in Delphi: File --> new --> other --> other files --> text file<br />(translated jaenickehttps://www.blogger.com/profile/12850174604111594490noreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-23078810427969787832014-02-22T21:19:33.993+02:002014-02-22T21:19:33.993+02:00Remy, this requirement has gone out of XE5 (at lea...Remy, this requirement has gone out of XE5 (at least).<br />FPiettehttps://www.blogger.com/profile/08260455911271500004noreply@blogger.comtag:blogger.com,1999:blog-1077468864044303325.post-80002732137760108732014-02-22T20:42:06.239+02:002014-02-22T20:42:06.239+02:00It used to be required that the resource name of t...It used to be required that the resource name of the bitmap had to be in ALL CAPS. It has been a long time since I last had to create a component palette bitmap. Has that restriction been lifted in newer versions?Anonymousnoreply@blogger.com