Ver Mensaje Individual
  #5  
Antiguo 14-01-2014
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 910
Reputación: 22
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
Intenta con este pequeño cambio...

Código Delphi [-]
var Archivo: string;
    errorcode: integer;
begin
    Archivo:=cxTextEdit6.Text;

    If Not FileExists(Archivo) Then Exit;

   errorcode :=
   ShellExecute(0, 'open', PWideChar(Archivo), nil, nil, SW_NORMAL);
   case errorcode of
      2:showmessage('file not found');
      3:showmessage('path not found');
      5:showmessage('access denied');
      8:showmessage('not enough memory');
      32:showmessage('dynamic-link library not found');
      26:showmessage('sharing violation');
      27:showmessage('filename association incomplete or invalid');
      28:showmessage('DDE request timed out');
      29:showmessage('DDE transaction failed');
      30:showmessage('DDE busy');
      31:showmessage('no application associated with the given filename extension');
   end;

   //ShellExecute(0, nil, pchar(Archivo), '', '', SW_SHOWNORMAL);
end;
Saludos
Responder Con Cita