VB.NET

Moderators: seancampbell
Number of threads: 4020
Number of posts: 10026

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Move dynamically new graphics entity in a graph picturebox ... Posted by MomentumX on 21 Jan 2008 at 9:12 AM
I have not managed to make a very simple thing (in VB6): move dynamically any new graphics entity (line, rectangle ellipse etc.) "overlay" to a control picturebox that already was plotted all other entities.

In VB.NET I used the event Paint to plot all entities of database, and this works perfectly (with few seconds for the regeneration of the graph), but the problem is the placement of new entities on event MouseMove using the new X and Y values:

In VB6 enough to plot entities in the XY current position and to plot the same entity to old position using an bitmap XOR that lets you "delete" the entity to its previous position from the background without a complete regen of all entities.

Now there is no longer VB.NET bitmap drawing entities mode (DrawMode) if I plot the new entity each MouseMove event, the graph is Dirtied along with the movement as a brush, and if I add a Refresh to every movement it is very slow because it would regenerate the entire graph to every mouse movement.

I have also tried to exploit the ability to copy the current background of the graph in a bitmap object to restore the background before any plot of the new entity in the current position but the copy operation and restore the background bitmap is slow as the entire reconstruction chart (new Paint event).

Is there a way to dynamically simulate the movement of an entity on a background bitmap according to the MouseMove?
Or a way to "save" a single portion of the background and then plot an entity and "restore" the portion of the screen to the next variation of shape position XY?

Sorry for the length of the post but it was difficult to explain ...
Thanks! Bye




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.