
Delphi7编程问题
请问有人知道要实现在按确定之后系统自动截图当前窗口,并自动发送到特定的邮箱中的代码吗?尽可能详细点..谢谢!!...
请问有人知道要实现在按确定之后系统自动截图当前窗口,并自动发送到特定的邮箱中的代码吗?
尽可能详细点..谢谢!! 展开
尽可能详细点..谢谢!! 展开
2个回答
展开全部
//拷贝屏幕存成一个文件
procedure TForm1.Button1Click(Sender: TObject);
var
B:TBitmap;
begin
B :=TBitmap.Create;
try
B.Width := self.Width ;
B.Height := self.Height;
B.Canvas.CopyRect(Rect(0,0,Self.Width,Self.Height),Self.Canvas,
Rect(0,0,Self.Width,Self.Height));
B.SaveToFile('d:\test.bmp');
finally
B.Free;
end;
end;
然后再调用idSMTP控件把它发出去。
procedure TForm1.Button1Click(Sender: TObject);
var
B:TBitmap;
begin
B :=TBitmap.Create;
try
B.Width := self.Width ;
B.Height := self.Height;
B.Canvas.CopyRect(Rect(0,0,Self.Width,Self.Height),Self.Canvas,
Rect(0,0,Self.Width,Self.Height));
B.SaveToFile('d:\test.bmp');
finally
B.Free;
end;
end;
然后再调用idSMTP控件把它发出去。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询