Abrir Documento

Hola, les cuento soy nuevo en este lenguaje y estoy haciendo un sistema, dentro de este sistema me pidieron cargar un documento, elegido por el usuario, para luego mandarlo por TCP/IP a unos computadores, mi consulta es como puedo hacer para abrir este documento, estaba pensando que puede ser así como un mail cuando uno adjunta algo, si alguien por ahí tiene el código o que me explique los pasos a seguir detalladamente, les estaría muy agradecido.
De ante mano muchas gracias.
Diego!

1 Respuesta

Respuesta
1
Example code : Illustrating single file selectionTOpenDialog; // Open dialog variable
Begin
  // Create the open dialog object - assign to our open dialog variable
  openDialog := TOpenDialog.Create(self);
  // Set up the starting directory to be the current one
  openDialog.InitialDir := GetCurrentDir;
  // Only allow existing files to be selected
  openDialog.Options := [ofFileMustExist];
  // Allow only .dpr and .pas files to be selected
  openDialog.Filter :=
    'Delphi project files|*.dpr|Delphi pascal files|*.pas';
  // Select pascal files as the starting filter type
  openDialog.FilterIndex := 2;
  // Display the open file dialog
  if openDialog.Execute
  then ShowMessage('File : '+openDialog.FileName)
  else ShowMessage('Open file was cancelled');
  // Free up the dialog
  openDialog.Free;
end;
En este link tienes más ejemplos:
[url|http://www.delphibasics.co.uk/RTL.asp?Name=TOpenDialog]http://www.delphibasics.co.uk/RTL.asp?Name=TOpenDialog[/url]

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas