كيف أحفظ ملف دون اظهار نافذة الحفظ boite de dialogue؟
#4
فقط قم بازالة : if SaveDialog1.Execute then
PHP كود :
var

NewFileName: string;
Msg, str, strold: string;
NewFile: TFileStream;
OldFile: TFileStream;

begin
Msg 
:= Format('Sauvegarder la base de données %s?', [NewFileName]);
if 
MessageDlg(Msg, mtCustom, mbOKCancel, 0) = mrOK then

begin
ShortDateFormat 
:= 'ddmmyy';
str := datetostr(date) + '.accdb';
strold := 'C:\GesCom\gc.accdb';
//if SaveDialog1.Execute then


NewFileName := ExtractFilePath('C:\ddmmyy') + ExtractFileName
(str);

OldFile := TFileStream.Create(strold, fmShareDenyNone);

try
NewFile := TFileStream.Create(NewFileName, fmCreate);

try
NewFile.CopyFrom(OldFile, OldFile.Size);

finally
FreeAndNil(NewFile);
end;
finally
FreeAndNil(OldFile);
end;
 
end;
 
end; 
الرد


الردود في هذا الموضوع
كيف أحفظ ملف دون اظهار نافذة الحفظ boite de dialogue؟ - بواسطة SMP3 - 20-04-2013, 09:25 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم