Ver Mensaje Individual
  #13  
Antiguo 08-11-2012
BioStudio BioStudio is offline
Miembro
NULL
 
Registrado: nov 2012
Posts: 15
Reputación: 0
BioStudio Va por buen camino
Ahora por ejemplo le quise agregar el saveDialog pero no crea el archivo:

Código Delphi [-]
var
  i : Integer;
  saveDialog : TSaveDialog;    // Save dialog variable
begin
  saveDialog := TSaveDialog.Create(self);
  saveDialog.Title := 'Guarde su información';
  saveDialog.InitialDir := GetCurrentDir;
  saveDialog.Filter := 'CSV (Formato de texto separado por comas)|*.csv|';
  saveDialog.DefaultExt := 'csv';
  saveDialog.FilterIndex := 1;

  if saveDialog.Execute then //ShowMessage('Archivo : '+saveDialog1.FileName)
     saveDialog := TSaveDialog.Create(self);
      with TStringList.Create do
        try
          for i := 0 to umain.Form1.ListView1.Items.Count-1 do
            Add(Form1.ListView1.Items[i].Caption +';'+ 
            Form1.ListView1.Items[i].SubItems[0] +';'+ 
            Form1.ListView1.Items[i].SubItems[1] +';'+ 
            Form1.ListView1.Items[i].SubItems[2] +';'+ 
            Form1.ListView1.Items[i].SubItems[3]);
            ExtractFilePath(Application.ExeName);
          finally
          Free
      end
  else ShowMessage('Se ha cancelado el guardado del archivo.');
  saveDialog.Free;

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

end;
Responder Con Cita