Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 27-07-2016
JuanOrtega JuanOrtega is offline
Miembro
NULL
 
Registrado: sep 2011
Posts: 130
Poder: 13
JuanOrtega Va por buen camino
Cargar archivos con ShellExecuteEx

Hola , anteriormente me ayudaron en este foro con el siguiente codigo de efcisa :

Código Delphi [-]
...
implementation

uses ShellApi;

procedure OpenJPG(const aName: TFileName);
var
  ExecInfo: SHELLEXECUTEINFO;
begin
  ZeroMemory(@ExecInfo, SizeOf(SHELLEXECUTEINFO));
  ExecInfo.cbSize := SizeOf(SHELLEXECUTEINFO);
  ExecInfo.fMask  := SEE_MASK_NOCLOSEPROCESS;
  ExecInfo.Wnd    := 0;
  ExecInfo.lpVerb := 'open';
  ExecInfo.lpFile := PChar(aName);
 // pExecInfo.lpParameters := ...
  ExecInfo.nShow  := SW_SHOWNORMAL;
  if not ShellExecuteEx(@ExecInfo) then
    if GetLastError <= 32 then
      SysErrorMessage(GetLastError)
end;

// Uso:
procedure TForm1.Button1Click(Sender: TObject);
begin
  OpenJPG('C:\test.exe');
end;

El problema es que cuando el archivo a cargar esta oculto esta funcion tilda todo el programa ya sea grafico o consola.
Es raro porque cuando usaba Seven 32 bits no tenia este problema (ahora uso Seven 64 bits).
Cuando el archivo a cargar no esta oculto no produce ningun problema.

¿ Cual es el problema ?
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Sintaxis de ShellExecuteEx JuanOrtega Varios 7 27-07-2016 10:29:25
vez con ShellExecuteEx Anel Hernandez Varios 5 19-01-2012 15:58:43
uso shellExecute o shellExecuteEx alfil123 Varios 2 09-02-2008 04:30:16
Cargar archivos RTF o DOC en un DBERichEdit nugame Varios 2 02-10-2007 13:04:57
Necesito cargar archivos en una red!! RONPABLO Varios 1 18-11-2004 21:32:02


La franja horaria es GMT +2. Ahora son las 12:57:34.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi