كيف أحفظ ملف دون اظهار نافذة الحفظ boite de dialogue؟
#3
كود :
procedure Tface.BitBtn7Click(Sender: TObject); 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 begin NewFileName := ExtractFilePath(SaveDialog1.FileName) + 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; end; end;
الرد


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

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


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