Slow .hdc? 
Author Message
 Slow .hdc?

I have a sub that displays text and graphics onto a picturebox. Using
some API calls I am providing a "zoom" functionality. The psuedo code
looks something like below.

As the picbox increases in size the "refresh" code takes longer to
execute (I verify this visually using the mousepointer "hourglass") - no
surprise. I am looking to reduce this. By placing an "Exit Sub" at
various points in the sub I was able to assertain that the "foo=pic.hdc"
line is the bottleneck. Am I missing something, cos this seems a bit
weird to me? Anyone else seen this problem? Would GetDC be any quicker?

Cheers, Nick.

***************************
sub

resize pic
pic.cls
        <----------------- Exit here and sub is quick
foo=pic.hdc
        <----------------- Exit here and sub is *much* slower
saveDC(foo)

call API functions
call graphics functions

RestoreDC

end sub
************************



Mon, 26 May 2003 22:22:29 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. BitBlitting from Picture.hDC to Printer.hDC

2. Get hDc for controls that don't expose hDc property

3. Slow, slow, slow search on VB6, ADO and SS7

4. VB4 is slow..slow....slow

5. Insert into SQL Server slow, slow, slow...

6. SLOW - ADO ASP FOXPRO CDX - SLOW

7. It gets slower and slower.....

8. hDC or not hDC? That is the q...

9. hDC property refreshed??? and hDC property cleared quickly???

10. Getting hDc On Access

11. using hdc in a Vb.NET application

12. Old Style Printer.hDC

 

 
Powered by phpBB® Forum Software