Board index » delphi » This is a Newbie Question - But I'm a Newbie

This is a Newbie Question - But I'm a Newbie

How do I load a .ico image file into Timage component at Runtime...and a JPG
into a Timage component at Runtime....

Told you it was Newbie Question.....thanks.

pbri...@bellatlantic.net

 

Re:This is a Newbie Question - But I'm a Newbie


Quote
Bell Atlantic wrote:

> How do I load a .ico image file into Timage component at Runtime...and a JPG
> into a Timage component at Runtime....

> Told you it was Newbie Question.....thanks.

> pbri...@bellatlantic.net

To load an icon run this code
Image1.Picture.Icon.LoadFromFile('icon.ico');
To load a jpg you need a special control which is certainly available at
delphi related websites.

Alex
--
Author of the free Chatsystem PINO!
Available at http://pino.cjb.net

Re:This is a Newbie Question - But I'm a Newbie


Quote
Alexander Mueller <al...@gmx.at> wrote:
>To load a jpg you need a special control which is certainly available
at
>delphi related websites.

No you don't need any special components (at least if you have Delphi 3
or newer). Delphi 3 came with a jpeg unit. Just add 'Jpeg' to your uses
clause and TImage will now load *.jpg images too.

Regards

Nicolai Buch-Andersen
ni...@mip.sdu.dk

Other Threads