我在winform窗体上放了一个pictureBox控件,然后又在pictureBox上面放了两个button控件,但是每次运行时只能显示图片,button控件显示不出来,如何处理呀!急!

解决方案 »

  1.   

    右击picturebox。选移动到最后面显示
      

  2.   

    winform中的z-Index不能通过控件属性直接设置
                Controls.SetChildIndex(button1, 1);
                Controls.GetChildIndex(button1);
      

  3.   

    应该是picturebox把button挡住了吧
      

  4.   


    你估计是吧btn没放在picturebox里面,放到窗体里面了。剪切btn,选中picturebox,然后ctl+v,就好了。