çalışmıyor program çalışdıkdan sonra hata veriyor
Kod: Tümünü seç
library Icon2BMP;
uses
SysUtils,
Graphics,
Classes;
function Icon2BMP(CONST FileName: TFileName):TBitmap;export;
var
Icon : TIcon;
Bitmap : TBitmap;
begin
Icon := TIcon.Create;
Bitmap := TBitmap.Create;
Icon.LoadFromFile(FileName);
Bitmap.Width := Icon.Width;
Bitmap.Height := Icon.Height;
Bitmap.Canvas.Draw(0, 0, Icon );
Bitmap.Assign(Icon);
Result:=Bitmap;
Icon.Free;
Bitmap.Free;
end;
Exports
Icon2BMP;
{$R *.res}
begin
end
function Icon2BMP(Const FileName:TFileName) :TBitmap;far;external 'C:\New Folder\Icon2BMP.dll';
procedure TForm1.Button1Click(Sender: TObject);
var
a : TBitmap;
begin
a:= Icon2BMP('C:\Q.ico');
a.SaveToFile('C:\d.bmp');
end;