delphi non visual component image

前端 未结 2 1681
生来不讨喜
生来不讨喜 2020-12-06 01:56

I am building a delphi non-visual component. How do I set the image I want it to have in the IDE?

2条回答
  •  Happy的楠姐
    2020-12-06 02:39

    You must create a .dcr file with the name of your unit in the same directory of the .pas component source file. then add to the dcr file a 24x24 bitmap called with the name of the component class something like TMyNonVisualComp.

    finally you must add this line to the unit {$R your_dcr_file.DCR}

    Check theses links for more info

    • Delphi 7 for Windows Component Writer's Guide
    • Design Time Icons (Toolbar Buttons)
    • Delphi Component Building
    • Building Your First Component

提交回复
热议问题