Ver Mensaje Individual
  #5  
Antiguo 24-01-2007
chico_bds chico_bds is offline
Miembro
 
Registrado: ene 2007
Posts: 50
Reputación: 18
chico_bds Va por buen camino
Sobre el error

Código Delphi [-]
procedure TForm2.DecodeHotKey(shortcut: Tshortcut; var key: Word; var modif: Integer);
var
  comb:     String;
   shiftkey: TshiftState;
begin
  modif := 0;
  shortcuttokey(shortcut, key, shiftkey);
  comb := shortcuttotext(shortcut);
  if pos('Shift', comb) <> 0 then
     inc(modif, 4);
  if pos('Ctrl', comb) <> 0 then
     inc(modif, 2);
  if pos('Alt', comb) <> 0 then
     inc(modif, 1);
end;

procedure FormCreate;
var teclappal :word;
 modificadores:integer;

begin
// suponemos que en Hotkey1.Hotkey es la tecla F10
    decodehotkey(hotkey1.hotkey, teclappal, modificadores);
    registerhotkey(self.Handle, 0, modificadores, teclappal);
// EL PARAMETRO CON UN CERO, NOS SIRVE PARA IDENTIFICAR ESTE HOTKEY


// suponemos que en Hotkey2.Hotkey es la tecla F11
    decodehotkey(hotkey2.hotkey, teclappal, modificadores);
    registerhotkey(self.Handle, 1, modificadores, teclappal);
// EL PARAMETRO CON UN UNO, NOS SIRVE PARA IDENTIFICAR ESTE HOTKEY
end;

El error me lo da ahy me dice algo como:

Undeclared Indentifiquer: DecodeHootKey
Undeclared Indentifiquer:shortcuttokey

etc.

Si pudieran postear un ejemplo sencillo..

Saludos y desde ya mucha gracias
Responder Con Cita