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);
ExecInfo.nShow := SW_SHOWNORMAL;
if not ShellExecuteEx(@ExecInfo) then
if GetLastError <= 32 then
SysErrorMessage(GetLastError)
end;
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 ?