Ver Mensaje Individual
  #2  
Antiguo 06-07-2007
gabrielkc gabrielkc is offline
Miembro
 
Registrado: jun 2007
Ubicación: Chihuahua Mexico
Posts: 118
Reputación: 19
gabrielkc Va por buen camino
mmm no es muy ortodoxo pero puedes emular que envias teclas al Acrobat Reader.

Código Delphi [-]

procedure PostKeyEx32(Key: Word; const Shift: TShiftState; SpecialKey: Boolean);

type
TShiftKeyInfo = record
shift: Byte;
vkey : Byte;
end;

byteset = set of 0..7;
const
ShiftKeys: array [1..3] of TShiftKeyInfo =
((shift: Ord(ssCtrl); vkey: VK_CONTROL ),
(shift: Ord(ssShift); vkey: VK_SHIFT ),
(shift: Ord(ssAlt); vkey: VK_MENU ));
var
 flag: DWORD;
 bShift: ByteSet absolute shift;
 i: Integer;
begin
 for i := 1 to 3 do
  begin
   if ShiftKeys[i].Shift in bShift then
    keybd_event( shiftkeys[i].vkey, MapVirtualKey(shiftkeys[i].vkey, 0), 0, 0);
  end;
 if SpecialKey then
  flag := KEYEVENTF_EXTENDEDKEY
 else
  flag := 0;

 keybd_event( key, MapvirtualKey( key, 0 ), flag, 0 );
 flag := flag or KEYEVENTF_KEYUP;
 keybd_event( key, MapvirtualKey( key, 0 ), flag, 0 );

 for i := 3 downto 1 do
  begin
   if ShiftKeys[i].Shift in bShift then
    keybd_event( ShiftKeys[i].vKey, MapVirtualKey(ShiftKeys[i].vKey, 0), KEYEVENTF_KEYUP, 0);
  end;
end; { PostKeyEx32 }

con el procedimiento anterior envias teclas a la ventana activa. Aunque si el usuario cambia la pantalla activa pues se enviarian a otra aplicación. Igual está el código por si te sirve
Responder Con Cita