protected override void OnDraw()
{
Image broculoImage = global::Test.Properties.Resources.Building;
int width = broculoImage.Size.Width;
int height = broculoImage.Size.Height;
Rectangle big = new Rectangle(0, 0, 64, 64);
this.graphics.ScaleTransform(this.m_Scale, this.m_Scale, MatrixOrder.Prepend);
this.graphics.DrawImage(broculoImage, big);
}
代码如上,我自定义了一个控件,然后在鼠标点击的事件中实现缩小一半的功能,但是出现下图的问题,原来的依然存在,怎么处理?求指导! protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
this.m_Scale = 0.5F;
this.Invalidate();
}
{
Image broculoImage = global::Test.Properties.Resources.Building;
int width = broculoImage.Size.Width;
int height = broculoImage.Size.Height;
Rectangle big = new Rectangle(0, 0, 64, 64);
this.graphics.ScaleTransform(this.m_Scale, this.m_Scale, MatrixOrder.Prepend);
this.graphics.DrawImage(broculoImage, big);
}
代码如上,我自定义了一个控件,然后在鼠标点击的事件中实现缩小一半的功能,但是出现下图的问题,原来的依然存在,怎么处理?求指导! protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
this.m_Scale = 0.5F;
this.Invalidate();
}
解决方案 »
- c# 如何将ppt中的每一页保存为一张张的图片?
- 关于C#高级编程双向通信的问题
- 求C#音乐播放器代码
- c#做个鼠标点击器
- 急求:在C# web应用程序页面上如何弹出一个文件保存的对话框呀呀
- string strSQL="select * from 表 where 姓名='"+name+"'"and 密码="'"+pw+"'";
- 关于HyperLinkColumn传参问题
- MVC HTMLHELPER 遇到一个小问题 但是网上没搜到答案
- 拖动改变控件大小,怎么实现的?类似Fiddler
- winform 中如何将附件(如图片、word)等存入数据库
- 一个高效的,精确的定时器,应该是什么样子的?
- 已经设置了隔离级别比较低了,可是做事务时还是死锁
我的背景色是透明的,参数怎么设置?
我的背景色是透明的,参数怎么设置?这种方法可以,谢谢了,哥们!!结贴!