AutoSize example for Delphi

This example shows how the AutoSize property works when loading and when rotating an image.

Lead1.AutoSize:=True;
Lead1.Load('c:\lead\images\image1.cmp', 0, 0, 1);
ShowMessage('Control is sized to fit the loaded bitmap');
Lead1.Rotate(4500, True, RGB(0,0,0));
ShowMessage('Control is sized to fit the rotated bitmap');