Ver Mensaje Individual
  #4  
Antiguo 22-09-2011
Avatar de cubanbaker
cubanbaker cubanbaker is offline
Miembro
NULL
 
Registrado: ago 2011
Ubicación: La Habana, Cuba
Posts: 65
Reputación: 0
cubanbaker cantidad desconocida en este momento
Si quieres obtener el directorio en curso, usa esto. En este caso se guarda el directorio actual en un label, pero lo puedes poner en una variable y luego usarlo como desees

procedure TForm1.Button7Click(Sender: TObject);
function GetCurrentDirectory: String;
var
nBufferLength : DWORD;
lpBuffer : PChar;
begin
nBufferLength := MAX_PATH + 1;
GetMem( lpBuffer, nBufferLength );
try
if Windows.GetCurrentDirectory( nBufferLength, lpBuffer ) > 0 then
Result := lpBuffer;
finally
FreeMem( lpBuffer );
end;
end;
begin
Label1.Caption:=GetCurrentDirectory;
end;

Y, como te dijo Dec


ShellExecute(Forma.Handle,nil,PChar(nombredeFile),'','',SW_SHOWNORMAL);

Última edición por cubanbaker fecha: 22-09-2011 a las 06:53:40.
Responder Con Cita