Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

try to create an icon for my new component

Status
Not open for further replies.

scotnew

Programmer
Nov 21, 2003
7
GB
Hiya,

Create a new component and want to try and change the icon you get on the bar to selected the component. at the moment its the normal square,triangle,circle icon. If you have any suggestion on how to create my own icon and chnage the default icon that would be great.

Thanks in advance
 
create a 16 color 28 x 28 pixel bitmap with the same name as the component (name in UPPERCASE)

add it to an .RC file and then add the .RC component.
 
But, please, How Do I Create a .RC file ?
I´ve tried to follow steps in Delphi Help too
but got no icon to my component.
 
Pontelo: Search for this text in the Delphi help system.

Creating a bitmap for a component

Be warned though this is very finiky, follows the steps exactly and make sure your paths are all correct or it might not work, somtime it dosn't work for no apparent reason.



Steve: Delphi a feersum engin indeed.
 
For a bit of background reading on resource files see this page:

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
You can simply open the res file (same name as dpk) using
image editor (Tools menu) add a new bitmap and name it the same as your component (uppercase)

et voilà!

Bye
 
I've never created a component, but if it can be done in ‘image editor’ then standard icon free programs would be better (image editor is very restricted in use). I use ‘PixelToolbox’ (free download) and 'Iconomaker' (15 day free trial). I find the standard Windows 32 x 32 icon works fine for the standard form use, and also appears as the icon for your exe program.
 
Yes you can make 'better icons' with a third party icon editor, but the image editor also allows resource creation,
useful for components.



Steve: Delphi a feersum engin indeed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top