类似一个窗体被分成四分,中间十字划开,每个子窗体是一个视频窗口,这个怎么实现???我现在可以实现在父窗体中嵌入一个子窗体,但是不能规定哪个窗口在哪个具体位置我现在就想在父窗口中 new四个这种子窗口,然后分别在四个角落

解决方案 »

  1.   

    splitcontainer
    controls.add(form1);
    分屏
    public Rectangle[] GetSplittedRectangles(Rectangle rt, int rowCount,int colCount)
            {
                Rectangle[] rects = new Rectangle[rowCount * colCount];            int width = rt.Width / colCount;
                int height = rt.Height / rowCount;            for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
                {
                    for (int colIndex = 0; colIndex < colCount; colIndex++)
                    {
                        rects[rowIndex * colCount + colIndex] = new Rectangle(colIndex * width,
                            rowIndex * height, width, height);
                    }
                }            return rects;
            }
      

  2.   

    运行效果图,应该是你要的?源代码下载:
    http://www.codeproject.com/KB/audio-video/cameraviewer.aspx
    你需要先用邮件地址,住处为网站的用户,才可以下载源码!