int x = textBox1.Size.Width / 2 + textBox1.Location.X;int y = textBox1.Size.Height / 2 + textBox1.Location.Y;textBox1.Text = x.ToString() + "-" + y.ToString();