delphi 保存图片出错,求助,在线等。。
procedureTForm1.BitBtn2Click(Sender:TObject);varBitmap:TImage;begintryBitmap.Picture....
procedure TForm1.BitBtn2Click(Sender: TObject);
var
Bitmap : TImage;
begin
try
Bitmap.Picture.LoadFromFile(string(OpenPictureDialog1.FileName));
Bitmap.Picture.SaveToFile('C:\screen.jpg');//提示错在这句
Application.MessageBox('保存成功', '提示', MB_OK);
finally
Bitmap.Picture.Free;
end;
end;
=========================
出现如图错误,求助啊 展开
var
Bitmap : TImage;
begin
try
Bitmap.Picture.LoadFromFile(string(OpenPictureDialog1.FileName));
Bitmap.Picture.SaveToFile('C:\screen.jpg');//提示错在这句
Application.MessageBox('保存成功', '提示', MB_OK);
finally
Bitmap.Picture.Free;
end;
end;
=========================
出现如图错误,求助啊 展开
1个回答
展开全部
procedure TForm1.BitBtn2Click(Sender: TObject);
var
Bitmap : TImage;
begin
try
Bitmap:=TImage.Create(Self);
if OpenPictureDialog1.Execute then
begin
Bitmap.Picture.LoadFromFile(string(OpenPictureDialog1.FileName));
Bitmap.Picture.SaveToFile('C:\screen.jpg');//提示错在这句
Application.MessageBox('保存成功', '提示', MB_OK);
end;
finally
Bitmap.Free;
end;
end;
var
Bitmap : TImage;
begin
try
Bitmap:=TImage.Create(Self);
if OpenPictureDialog1.Execute then
begin
Bitmap.Picture.LoadFromFile(string(OpenPictureDialog1.FileName));
Bitmap.Picture.SaveToFile('C:\screen.jpg');//提示错在这句
Application.MessageBox('保存成功', '提示', MB_OK);
end;
finally
Bitmap.Free;
end;
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询