我在单窗体上已经可以实现了,首先把form的frmBorderstyle =None ,然后做一个位图,再设置需要透明的地方
可以改成mdi窗体就没有办法实现透明了,就是说我想让窗体的某些地方透明就不行了
请问有办法实现透明吗?

解决方案 »

  1.   

    设置Region属性来指定窗体的显示区域就可以了,不必也最好不用透明色来处理。比如:
    如下的代码设置窗体的显示形状: public frmPrintExcel()
    {
    InitializeComponent(); GraphicsPath path = new GraphicsPath();
    path.AddEllipse(0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height / 2);
    path.AddEllipse(0, this.ClientRectangle.Height/2, this.ClientRectangle.Width, this.ClientRectangle.Height / 2);
    this.Region = new Region(path);
    }
      

  2.   

    用Region倒是可以,但是很难达到用图片透明色的那种效果啊
      

  3.   

    重绘即难又麻烦,是不是mdi不能用普通窗体的处理办法?