Solved

Using ImageList, transparent icons look ungly

Posted on 2008-10-21
4
2,283 Views
Last Modified: 2013-11-23
Hi.

I have to use almost 20 icons depending on an event.
So i've used an ImageList to handle those icons (96x96) and load them to the Timage.
But the loaded icon looks ... well very ugly.
The code :

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
var
  b: TIcon;
begin
  b := TIcon.Create;
  If (condition) then .......ImageList1.GetIcon(5,b); .....  Image6.Picture.Assign(b);.......
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I have set the drawing style to transparent, but no joy.
When i load to the TImage the icons one by one from a file, the result is fine.
But i want to hold those icons inside the executable.

Is there something wrong with the code?
Is there another ImageList component that handle icons better (free)?

Thanks in advance.
0
Comment
Question by:CodedK
  • 3
4 Comments
 
LVL 15

Assisted Solution

by:mikelittlewood
mikelittlewood earned 250 total points
ID: 22765986
Try not using an imageList and use the .res (resource) file instead to store them, you should get better results.
0
 
LVL 15

Assisted Solution

by:mikelittlewood
mikelittlewood earned 250 total points
ID: 22766012
Take a look at this PAQ on using icons from a resource file

http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20856460.html
0
 
LVL 16

Accepted Solution

by:
CodedK earned 0 total points
ID: 22766353
Hi mikelittlewood.

Thats the only logical solution besides using a nice component.
...But too much code-trouble for nothing.

I found "32 bit Image List v.1.0" by MCoP, and it works great :)
0
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 22767582
Fair enough, glad you found a solution though :o)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question