SimpleShape.Scale Method (SizeF)
Scales the shape by the specified scaling factor.
Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
public override void Scale(
The Scale method scales the shape by the specified scaling factor. This makes it larger or smaller by a percentage of its current size.
Return to top
The following example demonstrates how to use the Scale method to scale an OvalShape control. This example requires that you have an OvalShape control named OvalShape1 on a form.
private void ovalShape1_Click(System.Object sender, System.EventArgs e)
bool state = true;
if (state == false)
ovalShape1.Scale(new SizeF(2, 3));
state = true;
ovalShape1.Scale(new SizeF((float)0.5, ((float)0.333)));
state = false;