Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Updated 1-May-16 8:51am

1 solution

This is because using PictureBox for such purposes is insane. Of course, it would be possible to do it all with a PictureBox, 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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900