win32file.CreateFile()
unit Unit14;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls,
Vcl.Forms, Vcl.Dialogs, Vcl.ExtDlgs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Imaging.jpeg, Vcl.Imaging.pngimage;
type
TForm14 = class(TForm)
OpenPictureDialog1: TOpenPictureDialog;
Button1: TButton;
ScrollBox1: TScrollBox;
Image1: TImage;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form14: TForm14;
implementation
{$R *.dfm}
procedure TForm14.Button1Click(Sender: TObject);
begin
if OpenPictureDialog1.Execute(Handle) then
begin
Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
Image1.Width := Image1.Picture.Width;
Image1.Height := Image1.Picture.Height;
end;
end;
end.