Hi,
i hope it will help you
Button btn;
int locX = 100;
int locY = 0;
copyToolStripMenuItem_Click(object sender, EventArgs e)
{
btn = new Button();
btn.Name = button1.Name + "Clone";
btn.Width = button1.Width;
btn.Text = button1.Text;
btn.Location = new Point(button1.Location.X + locX, button1.Location.Y + locY);
}
pasteToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Controls.Add(btn);
if (this.Width <= locX)
{
locX = 0;
locY = locY + 50;
}
else
{
locX = locX + 100;
}
}
Best Regards,
C.Gnanadurai
-----------------------
Please mark the post as answer if it is helpfull to you