在picturebox上移动函数的绘图 [英] Move plotting of functions on picturebox
问题描述
我有功能绘制在picturebox上,我可以放大它,当图形超出picturebox我想要用scroolbars移动它或鼠标移动来观看它的部分隐藏。每次我点击滚动条,我清除图片框然后我添加到功能的坐标滚动的值,并再次重绘它。但是我不知道为什么picturebox不干净并且像图形拖动一样出现。我该如何避免这种情况。虽然我不得不等待一段时间,但工作在VB6但不在NET中。我想要一些类似autocad的东西,移动画画和inmediatly我得到画面毫不拖延。
提前感谢
Mike Thompson
我尝试过:
代码到目前为止还没有成功,需要帮助
i have function plotted on picturebox, i can zoom it, when graphic are out of picturebox i want with scroolbars move it or mouse movement to watch part hide of it. everytime i click to scrollbar, i clear picturebox then i add to coordinates of functions the value of scroll and redraw it again. however i don`t know why picturebox doesn`t clean and show up like the graphic dragging. how do i avoid that. worked en VB6 but not in NET although i have to wait a while. i want something like autocad, to move draw and inmediatly i get draw without delay.
thanks in advance
Mike Thompson
What I have tried:
the code haven´t worked out so far, need help
推荐答案
这是因为为此目的使用PictureBox
是疯了。当然,可以使用PictureBox
来完成所有操作,但它完全没有意义。您只需完成双重工作,不仅在运行时使用额外的资源,而且还浪费您的开发时间。PictureBox
不是图片,它是一个完全冗余的控件,专门用于简化最简单的杂务,在屏幕上显示静态图像。
请查看我过去的答案:
在图片框中附加图片 [ ^ ],
在C#中绘制一个矩形 [ ^ ],
如何从旧图纸中清除面板 [ ^ ]。
此外,有关图形渲染的更多细节:
如何加速我的vb.net应用程序? [ ^ ],
< a href =http://www.codeproject.com/Answers/1024679/How-to-avoid-Red-Cross-inwantedgridView-Csharp#answer1>如何避免DatagridView C#中的红十字会[ ^ ],
在C#.net鼠标滚轮中缩放图像 [ ^ ]。
-SA
This is because usingPictureBox
for such purposes is insane. Of course, it would be possible to do it all with aPictureBox
, but it makes no sense at all. You simply do double work, not only using extra resources during runtime, but also wasting your development time.PictureBox
is not a picture, it's a control, totally redundant one, created exclusively to simplify the simplest chores, showing static image on your screen.
Please see my past answers:
Append a picture within picturebox[^],
draw a rectangle in C#[^],
How do I clear a panel from old drawing[^].
Also, for more detail on graphic rendering:
How to speed up my vb.net application?[^],
How to avoid Red Cross in DatagridView C#[^],
Zoom image in C# .net mouse wheel[^].
—SA
这篇关于在picturebox上移动函数的绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!