Monday, March 3, 2014

TOpenPictureDialog tutorial

For this tutorial we need a button(standard tab), an image(additional tab) and a openpicturedialog(Dialogs).




double click button1 and write the following

procedure TForm1.Button1Click(Sender: TObject);
begin
  if openpicturedialog1.Execute then
     image1.Picture.LoadFromFile(openpicturedialog1.FileName);

end;




 




if the openpicturedialog executed the picture we just select opens in image1.

We execute our program we click the button and we open a picture.

Thats all for now..

2 comments:

  1. Thanks for the turorial, very interesting. However, now the image is not always shown correctly if it has a resolution higher than its container. Could you show me how to make the image always 100% of the height of the container? Thanks for the help.

    ReplyDelete
  2. Dag Tim
    Goede vraag.
    Dan moet je de eigenschap van image1 Proportional true zetten.
    Dan krijg je altijd 100 % beeld,
    Succes

    ReplyDelete