Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Forced type conversion in delphi
Forced type conversion in delphi
When you define an object instance, you allocate a memory block for this instance.

Such as from1:tform1;

Form 1 is an object instance of TForm, which is used to store the address of TForm 1. Create, so form 1 needs a memory.

IntToStr(form 1) gets the address of the object instantiated by TForm 1

IntToStr(@Form 1) gets the memory address of the Form 1 variable.

The Self you use in Tform 1.buttonclick is actually the currently defined object instance form 1.

The same is true of any other class.