GDI+的简单问题 各位高手帮下忙--在线 等

沈逸 2004-04-30 02:12:16
我用Graphics g=this.CreateGraphics();

然后 g.DrawString();方法 画 了 一个 字符 如"f"
我过了一会 想把 这个字符 擦除 该怎么写代码

...全文
76 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
XuexinkeUranus 2004-05-02
  • 打赏
  • 举报
回复
g.Clear(this.BackColor);
就可以擦掉了!
zoujiaming 2004-05-02
  • 打赏
  • 举报
回复
用背景色重新填充画出字符的区域就可以了
jzhu21 2004-05-01
  • 打赏
  • 举报
回复
用clear这个方法可以去除的.g.clear(color.white)就可以了
johnczy 2004-05-01
  • 打赏
  • 举报
回复
You can do it ControlPaint.DrawReversibleLine Method
The results of this method can be reversed by drawing the same line again. Drawing a line using this method is similar to inverting a region of the screen, except that it provides better performance for a wider variety of colors.

Reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolpaintclasstopic.asp

用Graphic 应该也能做到。
netease 2004-05-01
  • 打赏
  • 举报
回复
同意 1979xt(VS.NET为未来十年作好了准备,你呢) 的说法~~~~
沈逸 2004-04-30
  • 打赏
  • 举报
回复
没人帮忙阿

急阿
1979xt 2004-04-30
  • 打赏
  • 举报
回复
没听过还能擦除的?
只要不是写在OnPaint中,下次屏幕刷新时就会消失了。
leoAAAA 2004-04-30
  • 打赏
  • 举报
回复
应该是生成的临时图片文件,重新生成就可以了

110,525

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧