Registriert seit: 28. Jan 2006
Ort: Görlitz / Sachsen
489 Beiträge
Delphi 2007 Professional
|
Re: TImage Speichern
11. Jul 2006, 08:44
Delphi-Quellcode:
procedure TFormMain.Button27Click(Sender: TObject);
begin
with SaveDialog do begin
FilterIndex:=1;
FileName := IniFile.ReadString('Setup','Screen,+1','Screen.jpg');
InitialDir := ExtractFilePath(FileName);
FileName := ExtractFileName(FileName);
if InitialDir = '' then IniFile.ReadString('Setup','DirOld','.\');
if not DirectoryExists(InitialDir) then
InitialDir := IniFile.ReadString('Setup','DirOld','.\');
DefaultExt := 'jpg';
Filter := 'Jpg (*.Jpg)|*.Jpg|All files (*.*)|*.*';
Options:=Options+[ofFileMustExist]-[ofHideReadOnly]
+[ofNoChangeDir]-[ofNoLongNames]-[ofNoNetworkButton]-[ofHideReadOnly]
-[ofOldStyleDialog]-[ofOverwritePrompt]+[ofPathMustExist]
-[ofReadOnly]-[ofShareAware]-[ofShowHelp];
Title:='Screen Speichern';
end;//with
if SaveDialog.Execute then begin
[color=#009fff]Image1.Create(SaveDialog.FileName,fmCreate);[/color]
exit;
end;
end;
hab es so erzeugt aber "Incompitable types "TComponent" and "TFilename""
Marcel
|
|
Zitat
|