如题,填充Rectangle的外部,代码是什么?在线等,解决马上结贴
解决方案 »
- 圆角窗体,四个角弧度不一样,该怎么解决?
- 登陆界面前如何显示“正在登陆”图片?
- 自己做的文件加密,但是不能加密,如何改
- 关于FolderBrowserDialog的问题
- 枚举类型的问题
- 我在.net Remoting编程中,需要将一个class的实例作为执行结果返回到客户端,不知道怎么做?
- 水晶报表显示图片变形问题
- 给statusBarPanel1 绘了一个距形色块以后,他的text属性里赋的东西就看不到了
- C#“System.Data.SqlClient.SqlException”类型的未经处理的异常出现在 System.Data.dll中
- 大家试过string的replace方法没有,好像返回的只有10k左右
- 在datagrid里如何绑定calendar?
- 求助 一旦有答案立刻结贴
http://topic.csdn.net/u/20101019/09/871e60a0-34c8-446f-be07-a95b959174fd.html
知道我想填充外部,也就是画完把矩形框外面的再涂一下
public partial class Form1 : Form
{
Region m_Region;
public Form1()
{
InitializeComponent();
// The rectangle in the picture box
Region rec1 = new Region(new Rectangle(10, 10, 30, 30));
// The picture box region
Region rec2 = new Region(pictureBox1.ClientRectangle); // Get the region out of the retangle
rec2.Xor(rec1); m_Region = rec2;
} private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.FillRegion(Brushes.Red, m_Region);
}
}