|
|
Drawing a small Icon at 1:1 scaling |
procedure TWinForm.TWinForm_Paint(sender: System.Object;
e: System.Windows.Forms.PaintEventArgs);
var
Icon : System.Drawing.Icon;
begin // This example uses a 16 by 16 Icon
Icon := System.Drawing.Icon.Create('SmallLogo.ico');
e.Graphics.DrawIcon(Icon, 2, 2);
end;
|
Show full unit code |
|
|
Stretching this same icon to twice its width |
procedure TWinForm.TWinForm_Paint(sender: System.Object;
e: System.Windows.Forms.PaintEventArgs);
var
Icon : System.Drawing.Icon;
begin // This example uses a 16 by 16 Icon
Icon := System.Drawing.Icon.Create('SmallLogo.ico');
e.Graphics.DrawIcon(Icon, Rectangle.Create(2, 2, 32, 16));
end;
|
|
|
|
|