怎样在窗体中分成几个独立的区域进行画图,且可以通过软件进行清空再进行重画?或者每次重画时把它冲掉!
怎样在这些区域中画一个坐标图?画坐标图的方法?

解决方案 »

  1.   

    Graphics类提供了这样的方法。
    Graphics.SetClip 方法:将此 Graphics 的剪辑区域设置为当前剪辑区域和指定的 Graphics 的 Clip 属性指定的组合操作的结果。
      

  2.   

    下面的代码示例设计为与 Windows 窗体一起使用,它需要 PaintEventArgse(这是 Paint 事件处理程序的参数)及 thisForm(该示例的 Form)。代码执行下列操作: 从示例的 thisFormForm 创建临时 Graphics。将临时 Graphics 的剪辑区域设置为一个小正方形。用 Replace 成员将窗体的图形对象的剪辑区域更新为新 Graphics 的剪辑区域。用纯黑色画笔填充一个大矩形。结果得到一个黑色的实心小正方形。private void SetClipGraphicsCombine(PaintEventArgs e)
    {    // Create temporary graphics object and set its clipping region.
        Graphics newGraphics = this.CreateGraphics();
        newGraphics.SetClip(new Rectangle(0, 0, 100, 100));    // Update clipping region of graphics to clipping region of new    // graphics.
        e.Graphics.SetClip(newGraphics, CombineMode.Replace);    // Fill rectangle to demonstrate clip region.
        e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300);    // Release new graphics.
        newGraphics.Dispose();
    }
      

  3.   

    可对屏幕进行分屏,设置不同的panel
    参考