c# winform 置于顶层的功能用后台代码来实现,BringToFront()

private void pictureBox1_Click(object sender, EventArgs e)
  {
   //MessageBox.Show((sender as PictureBox).Size.Height.ToString());
   //MessageBox.Show((sender as PictureBox).Size.Width.ToString());

   (sender as PictureBox).Height = 230;
   (sender as PictureBox).Width = 230;
   (sender as PictureBox).BringToFront();
   MessageBox.Show((sender as PictureBox).Name);
  }

 

   (sender as PictureBox).BringToFront();  可以把当前选中的控件置于顶层

黑色头发  http://heisetoufa.iteye.com

你可能感兴趣的:(C++,c,C#,WinForm)