Solved

Faster Draw/Refresh in PictureBox

Posted on 1997-04-16
2
947 Views
Last Modified: 2006-11-17
I use a PictureBox control to display a network, i.e. a BIG number of Lines, Circles and Text. Drawing/Refreshing is VERY SLOW. Are there any techniques to accelerate the process?

Have heard something about "drawing in memory" but don't know what it is and how it's working. Has it something to do with .hDC property?
0
Comment
Question by:sujevs
2 Comments
 
LVL 7

Accepted Solution

by:
kamall earned 100 total points
ID: 1425400
To draw fast enough on a Picture object you must:

Either
Use a DoEvents (not Picture1.Refresh) after each line or circles is drawn,

Or
Dont use Refresh or DoEvents until you finish your drawing and then give a DoEvents. This is much faster than the first solution.

0
 

Author Comment

by:sujevs
ID: 1425401
The problem is that I don't use Refresh or DoEvents to update the picture, so the solution provided unfortunately does not help me a lot, though it could be valuable in the future for some other occations :)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now