Salvar sem Mensagem de Confirmação

Delphi

24/09/2003

Eu uso o seguinte código fonte:
Os Arquivos estão sendo salvos corretamente, só que aparece aquela janela do diretório, como faço para que salve sem que apareça a janela?

begin

QryCad.Close;
QryCad.Open;
QryCad.First;
Save.InitialDir := ExtractFilePath( Application.ExeName ) + ´Arquivos\´;

while not QryCad.Eof do
begin


Str := ExtractFilePath( Application.ExeName ) + ´\Arquivos\dt´ + IntToStr( QryCadCODATL.Value ) + ´.txt´;
If not FileExists( Str ) then
begin


Text := TStringList.Create;
Save.FileName := ´dt´ + IntToStr( QryCadCODATL.Value ) + ´.txt´;
Save.Execute;

{ Código do Atleta 1-5 }
CodAtl := CodAtl + FormatFloat( ´00000´, QryCadCODATL.Value );

{ Nome do Atleta 6-75 }
Nome := Nome + Preenche( UpperCase( QryCadNOME.Value ), 70, ´ ´ );

{ E-mail do Atleta 76-145 }
Email := Email + Preenche( UpperCase( QryCadEMAIL.Value ), 70, ´ ´ );

{ Sexo do Atleta 146-165 }
Sexo := Sexo + Preenche( UpperCase( QryCadSEXO.Value ), 20, ´ ´ );

{ Data de Nascimento do Atleta 166-185 }
DatNas := DatNas + FormatDateTime( ´yyyymmdd´,QryCadNASCI.Value );

{ RG do Atleta 186-205 }
RG := RG + Preenche( UpperCase( QryCadRG.Value ), 20, ´ ´ );

{ Telefone do Atleta 206-225 }
Fone := Fone + Preenche( UpperCase( QryCadFONE.Value ), 20, ´ ´ );

{ Bairro do Atleta 226-275 }
Bairro := Bairro + Preenche( UpperCase( QryCadBAIRRO.Value ), 50, ´ ´ );

{ CEP do Atleta 276-295 }
CEP := CEP + Preenche( UpperCase( QryCadCEP.Value ), 20, ´ ´ );

{ Endereço do Atleta 296-345 }
Ender := Ender + Preenche( UpperCase( QryCadEnder.Value ), 50, ´ ´ );

{ Município do Atleta 346-395 }
Muni := Muni + Preenche( UpperCase( QryCadMUN.Value ), 50, ´ ´ );

{ UF do Atleta 396-398 }
UF := UF + Preenche( UpperCase( QryCadUF.Value ), 02, ´ ´ );

{ CPF do Atleta 399-418 }
CPF := CPF + Preenche( UpperCase( QryCadCPF.Value ), 20, ´ ´ );

{ Celular do Atleta 419-438 }
CELU := CELU + Preenche( UpperCase( QryCadCELULAR.Value ), 20, ´ ´ );


Text.Add( CodAtl + Nome + Email + Sexo + DatNas + RG + Fone + Bairro +
CEP + Ender + Muni + UF + CPF + CELU );

Text.SaveToFile( Save.FileName );

end;
QryCad.Next;

end;{ while }


Havilux

Havilux

Curtidas 0
POSTAR