funktioniert bei mir leider net so ganz....
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
var BImage :TBetterImage;
begin
BImage := TBetterImage.Create(self);
BImage.OnMouseEnter := ImageMouseEnter;
BImage.OnMouseLeave := ImageMouseLeave;
Hintergrund.Picture.LoadFromFile(extractfilepath(paramstr(0))+'back.jpg');
close_btn_img.SetBounds(0, 225, 210, 60);
close_btn_img.Picture.LoadFromFile(extractfilepath(paramstr(0))+'button.jpg');
end;
procedure TForm1.ImageMouseEnter(Sender: TObject);
begin
close_btn_img.Picture.LoadFromFile(extractfilepath(paramstr(0))+'buttonB.jpg');
end;
procedure TForm1.ImageMouseLeave(Sender: TObject);
begin
close_btn_img.Picture.LoadFromFile(extractfilepath(paramstr(0))+'button.jpg');
end;
procedure TForm1.close_btnClick(Sender: TObject);
begin
form1.Close;
end;
nochmal eben editiert, weil Images nicht erkennbar !