当前位置:网站首页>[Delphi] a simple method to make the installation icon of the control panel (translation)
[Delphi] a simple method to make the installation icon of the control panel (translation)
2022-07-23 10:38:00 【sensor_ WU】
Translator press :
As early as 2019-12-05 The Japanese translator posted a blog post 《Delphi Control development steps 》 There are steps to make the installation icon of the control , What is introduced there is traditional ( It is also relatively standard ) Icon making steps , That's what I learned from Delphi 7 Learned during development , All these years , I have always felt that there are too many restrictions on icons ( There is a limit on the color depth of the picture , The installation steps are cumbersome ), Thinking about Delphi It has developed for so long , The control icon should also be improved , But I haven't seen it on the management document . I finally saw an official blog post today , A simple method is introduced , I have solved my doubts for many years , Tread , Translate it immediately ( The level of translation is limited , If there is any deficiency , Please understand ), For Delphi Friends of development .
A simple control icon making steps
By Embarcadero Archives August 3, 2017
author :Pawe Gowacki

I recently found a super simple way to make control icons . The traditional method requires a picture editing tool , Edit the color depth of a square (4bit 24X24 Translator press ) Restricted pictures , This aspect is introduced in Stackoverflow There are a lot of them on the Internet .
After a Google search , Find another one Stackoverflow The blog inspired me to try a simpler method . What I expect is that the size and color depth of the picture can be unlimited , Not even square . Find an image on Google Image Search ( Non copyright constraints ), This link It is a high-precision bicycle picture , I plan to use this image as the control icon .
- Save this picture as bitmap Format , It's more than 40M( the truth is that 4M, Translator press )4851X3264 Big picture of .
- Create a new Delphi Package project , For simplicity , Just create a package that unifies the runtime and design phases . Package name is :“PackageMySuperComponent”
- Add an empty... To this package unit Control unit , Name it :“uMySuperComponent.pas”.
- Simply add a control without function “TMySuperComponent”, The code is as follows :
unit uMySuperComponent interface uses System.Classes; type TMySuperComponent = Class(TComponent) end; procedure register; implementation procedure register; begin RegisterComponents('Samples', [TMySuperComponent]); end; end. - After saving, select current Package Package item menu :Project -> Resources and Images , Add para 1 Step bike icon , confirm bitmap identifier The name is the class name of the control . In this case, it's “TMySuperComponent”.

- Right click the package item , choice :Build, then Install. So the control is installed , And then restart IDE Just fine .
- Create a visual program , In the control panel (Tool Palette) Of “Samples” You can see the control on the page .

This does not seem to be a document , But I hope this method can be used , And you will find it very useful !
边栏推荐
- 什么是即时通讯?即时通讯的发展
- 信息安全危机四伏,企业数据资产泄露管控刻不容缓
- 李宏毅机器学习2022-HW1
- 31-spark的算子使用及调度流程
- The difference between sprite and overridesprite in unity image (Reprint)
- Data warehouse: workflow design and Optimization Practice
- [learning notes] agc022
- 解决servlet中post请求和get请求中文乱码现象
- Flutter 运行flutter pub get 报错“客户端没有所需特权“
- SPR:SUPERVISED PERSONALIZED RANKING BASED ON PRIOR KNOWLEDGE FOR RECOMMENDATION
猜你喜欢
随机推荐
李宏毅机器学习2022-HW1
Redis replication cluster setup
Seektiger's okaleido has a big move. Will the STI of ecological pass break out?
openvino_ datawhale
2022/7/22
配饰器模式
Use and implementation of enumeration classes
Introduction to partition operators, broadcast variables and accumulators of 32 spark
Chapter2 Standard Output
Idea integrated sonar complete process
31-spark的算子使用及调度流程
振奋人心 元宇宙!下一代互联网的财富风口
ANTLR4 入门学习(一):下载和测试
Registration tree mode
Reverse theoretical knowledge 1
What is the core essence of smart parks?
Basic process of dpdk cross compilation
Information security is in danger, and it is urgent to control the leakage of enterprise data assets
Kingbasees SQL language reference manual of Jincang database (4. Pseudo column)
Rapid SQL all platforms high performance SQL code








