SaveDialog como salvar com extesão definida ?
15/02/2003
0
Ex: o Usuário digitou C:\sistema\sistema_backup
e automaticamente e siria salvo assim
C:\sistema\sistema_backup.BKP
[b:0131b32960]Sintax :[/b:0131b32960]
[color=darkred:0131b32960]procedure TFrmBackup.BitBtn6Click(Sender: TObject);
begin
SaveDialog1.Filter:=´Bakup |*.BKP´;
If SaveDialog1.Execute Then
Edtalias.Text:=SaveDialog1.FileName;
end;[/color:0131b32960]
Alguem pode Me ajudar ??
Romeusql
Posts
15/02/2003
Carnette
begin
SaveDialog1.DefaultEx := ´BKP´ <--- Faltou só isso
SaveDialog1.Filter:=´Bakup |*.BKP´;
If SaveDialog1.Execute Then
Edtalias.Text:=SaveDialog1.FileName;
end;
15/02/2003
Anonymous
begin
SaveDialog1.Filter:=´Bakup |*.BKP´;
SaveDialog1.DefaultExt := ´.BKP´;
If SaveDialog1.Execute Then
Edtalias.Text:=SaveDialog1.FileName;
end;
06/01/2023
Wellington Telles
procedure TFrmMain.BtnDestinationClick(Sender: TObject); var fPath : string; pName : PChar; begin SaveDialogDestination.InitialDir := EdtDirectory.Text; SaveDialogDestination.DefaultExt := ''fdb''; if SaveDialogDestination.Execute then if SaveDialogDestination.FileName <> null then begin pName := PChar(SaveDialogDestination.FileName); fPath := ExtractFilePath(SaveDialogDestination.FileName); EdtDestination.Text := fPath+''\\\\''+ChangeFileExt(ExtractFileName(pName),''.fdb''); end; end;
06/01/2023
Wellington Telles
procedure TFrmMain.BtnDestinationClick(Sender: TObject); var fPath : string; pName : PChar; begin SaveDialogDestination.InitialDir := EdtDirectory.Text; SaveDialogDestination.DefaultExt := ''fdb''; if SaveDialogDestination.Execute then if SaveDialogDestination.FileName <> null then begin pName := PChar(SaveDialogDestination.FileName); fPath := ExtractFilePath(SaveDialogDestination.FileName); EdtDestination.Text := fPath+''\\''+ChangeFileExt(ExtractFileName(pName),''.fdb''); end; end;
Clique aqui para fazer login e interagir na Comunidade :)