| View previous topic :: View next topic |
| Author |
Message |
kopelito Master Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 483
|
Posted: Sun Mar 30, 2008 8:15 am Post subject: [Delphi] Loading an Image and making it appear in Image1 |
|
|
I mean, I made this OpenDialog button, and I can now load images.
My question is, How can I do it so the loaded Image will appear in TImage?
Thnx. |
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sun Mar 30, 2008 8:37 am Post subject: |
|
|
| Code: | | image1.Picture.LoadFromFile(<the file name>); |
almost all basic component have this function(TMemo, TStrings, tTreeView, ect...). |
|
| Back to top |
|
 |
kopelito Master Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 483
|
Posted: Sun Mar 30, 2008 9:16 am Post subject: |
|
|
mm and what do I write in the file name?
I cant know what the image name will be. |
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Sun Mar 30, 2008 9:33 am Post subject: |
|
|
Omg, he made an opendialog..that means:
| Code: | if opendialog1.execute then
image1.picture.LoadFromFile(opendialog1.filename);
|
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sun Mar 30, 2008 10:08 am Post subject: |
|
|
| smartz993 wrote: | Omg, he made an opendialog..that means:
| Code: | if opendialog1.execute then
image1.picture.LoadFromFile(opendialog1.filename);
|
| I think that if he will think about it little harder he will know the answer...(Its the basic of programing). |
|
| Back to top |
|
 |
|