if Sender is TForm then begin with Sender as TForm do begin activecontrol ....... end; endelse if Sender is TEdit then begin with Sender as TEdit do begin ....... end;end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);beginForm1.Edit1.Caption:=HandleKeyPress(Key,Shift);end;
I'm referencing Functions in Unit1 and Unit1 in Functions so I'd say that is a circular reference. To me that is sloppy coding.
... but the problem is that I'm dealing with forms that might have 20 or 30 tedit controls so I'd have to have a lot of code on the form page to handle it.