Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Über OpenPictureDialog Bild in TImage (https://www.delphipraxis.net/7186-ueber-openpicturedialog-bild-timage.html)

Micha 4. Aug 2003 20:12


Über OpenPictureDialog Bild in TImage
 
Folgende Situation:
Der Benutzer soll durch einen Button in den "OpenPictureDialog" kommen.
Soweit so gut. Das ist ja nicht schwer.

Wie bekomme ich aber jetzt das Bild in ein TImage-Object?
Vielleicht einer Variablen übergeben? Und dann?

Kann mir wer helfen?


Dankeschön im Voraus.

Micha 4. Aug 2003 21:02

Re: Über OpenPictureDialog Bild in TImage
 
Habs grad selber rausgefunden:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
 if OpenPictureDialog1.Execute then
  begin
   Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
  end;
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:48 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz