// ____________________________________________________将当前时间转化为合法的文件名字符串
Function TForm1.TimeToFileName(Date:TDateTime):String;
var
Present:TDateTime;
Year,Month,Day,Hour,Min,Sec,MSec:word;
begin
present:=Date;
DecodeDate(Present,Year,Month,Day);
DecodeTime(Present,Hour,Min,Sec,Msec);
result:=(IntToStr(year)+'_'+IntToStr(Month)+'_'+IntToStr(Day)+'_'+IntToStr(Hour)+'_'+IntToStr(Min)+'_'+IntToStr(Sec)+'.jpg');
end;