int a = button3.Size.Width / 2; int b = button3.Size.Height / 2; int c = button3.Location.X + a; int d = button3.Location.Y + b;