How can I access a delphi control from outside the form's unit?
问题 I'm trying to call the Enabled property of a Timer from a procedure defined like this: procedure Slide(Form: TForm; Show: Boolean); and not with a fixed form name (like: Form2.Timer... ) After putting the form's unit in the uses list, this works: Form2.Timer1.Enabled := True; but the following is not working: Form.Timer1.Enabled := True; (where Form is the form passed as parameter to the procedure. How to get access to the Timer component on my form? Thanks in advance. 回答1: You cannot access