Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Faster Draw/Refresh in PictureBox

Posted on 1997-04-16
2
Medium Priority
?
1,024 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 200 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

972 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