unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls;type TForm1 = class(TForm) Image1: TImage; Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormCreate(Sender: TObject); end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);begin Image1.AutoSize := True;end;procedure TForm1.Button1Click(Sender: TObject);begin Image1.Picture.Bitmap.Handle := LoadBitmap(HInstance, 'bmp1');end;procedure TForm1.Button2Click(Sender: TObject);begin image1.Picture.Bitmap.LoadFromResourceName(HInstance, 'bmp2');end;end. //效果图: