form inheritence..

  • Thread starter Thread starter nomenklatura
  • Start date Start date
N

nomenklatura

hi,
in our project there are a lot of forms..and in each form we used keydown
event for shortcuts..for example we uses F2 to call save function ,and f3 to
call close form function..but each forms' save function perform different
tasks...
is there a way providing us not to write keydown event code in each form....
how can we use form inheritence to solve the problem..
 
Hi, i belive you need to make a new unit with one function or procedure
which may be like this definition:

function Shortcut(Key: char; Form: TFrom):Boolean;

pass everything to it and parse the sender there to provide more detaild
handling
 
Back
Top