Best way to make a component icon in Delphi XE using only the built in tools

前端 未结 4 1409
南方客
南方客 2020-12-24 03:01

In Delphi 7, an image editor program is included, which can read and write .dcr files, which are merely binary resource files (.res files) with a

4条回答
  •  [愿得一人]
    2020-12-24 03:36

    First add 'mypackageicons.rc' file to the project, this produces 'mypackageicons.res' at compile time (see related SO answer to the question "Including resource file in a project by .RC file rather than .RES file").

    Also include {$R mypackageicons.res mypackageicons.dcr} to the component unit (or to the .dpk). This does not produce a '.dcr file', but sets the icon for the component.


    Note that my test with a 'BMP' resource failed. I used 'BITMAP' as resource type.

提交回复
热议问题