线问题 [英] problem with line

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

问题描述

我已经使用绘图线(使用图形)连接了两个用户控件.面板上有很多行.将所有行信息保存在一个数组中.在激活时画出所有线..在许多事件上.

但是在弹出上下文菜单时仍然会删除它后面的行.
而当最小化该表格时,所有行都消失了,如何克服此缺点.

panel.refresh()或panel.activate也是非常缓慢的过程,没有这种方法,如何删除不需要的行.
n线路有很多问题

还有其他方法可以绘制更面向对象的线...(意味着当我们将控件始终放置在窗体上时,我们还可以识别鼠标单击鼠标在任何控件上的移动.)我可以使用图片框代替线条吗? ???或任何其他解决方案?

Hi, I have used draw line (using graphics) to connect two user control. there are many line in a panel. saved all line info in an array. draw all line on activate.. on many events.

but stil when context menu pop up it deletes line behind that.
and when minimize that form all line disappear how to overcome this drawback.

panel.refresh() or panel.activate is also very slow process and without this how to delete unwanted lines..

n there is lots of problem with line

Is thre any another way to draw line which is more object oriented... (means when we place any control on form its always there. we can also identify mouse click mouse move on any control.)can I use picturebox in place of line??? or any other solution??

推荐答案

如果在派生的class中,则应在 OnPaint覆盖中进行绘制,否则在绘画事件中.这样,它将持续存在.
The drawing should be done in OnPaint override if in a derived class, or in Paint event otherwise. This way it will persist.


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

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