Using Delphi4,I want to write a unique procedure to each unit/form as the new form is being created from a model.The goal is to reduce the units/forms contained within the project.The specific procedure references a keypress event for the specific unit/form. The model unit contains the onkeypress procedure and checked in the model's object inspector. It does not work, I think, unless the unit# is entered in the procedure in that specific unit/form. What are the lines of code written to produce this effect in the multiple form creator.?
the model unit/form that needs to be created in each begins as:
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
If key = char(105) then
Unit1.Form1.Top := Unit1.Form1.Top - 1 ;
the unit number for each must be changed.