油漆事件有问题 [英] there's a problem in paint event

查看:86
本文介绍了油漆事件有问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对我的项目有一个用户控件.但是似乎在创建行时,paint事件处理程序存在一些问题.创建一行后,向下滚动用户控件.然后创建几行.我该怎么办?

I have a user control on my project. But it seems that the paint event handler has some problems when it comes to creating a line. After creating a line, I scroll down the user control. Then it create several lines. What should I do?

推荐答案

在paint事件的第一行中添加此代码
Add this code in the first line in paint event
e.Graphics.Clear(Color.White);


这篇关于油漆事件有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆