Lots and Lots of Controls slow things down.... 
Author Message
 Lots and Lots of Controls slow things down....

Whatcha Venerable Seers,

        I've got a form with 250 odd lables on.  As the mouse moves over
a lable, I have it highlighting using the MouseOver event.  The only
problem is the *speed*.  It can take almost a second for the label to
register the MouseOver event.  Is there any way to speed this up or am I
stuck with it?

      \\?//    

/-----\(_)/-----------------------------------------------------\

| .oooO   Oooo.   Head of Software Development, Impact Software |
| (   )___(   )      1 Percy Street, Sheffield, S3 8AU, England |
\--\ ( _|_ ) /--------------------------------------------------/
    \_)   (_/



Sat, 05 Dec 1998 03:00:00 GMT  
 Lots and Lots of Controls slow things down....

Quote:

>Whatcha Venerable Seers,
>        I've got a form with 250 odd lables on.  As the mouse moves over
>a lable, I have it highlighting using the MouseOver event.  The only
>problem is the *speed*.  It can take almost a second for the label to
>register the MouseOver event.  Is there any way to speed this up or am I
>stuck with it?

You can replace the labels with printed text; I recommend using GDI
for speed but even print methods will work. You have to redraw on a
form paint but you can optimise this to only redraw the invalidated
region, use GetClipBox() or GetUpdateRect() to get the invalidated
region in a paint event (and set form.clipcontrols = false,
form.autoredraw = false too or it won't work).

Incidentally, to check for intersection, see the API, IntersectRect()
which is very fast and will accept twip coordinates quite happily.
Then the search through the control tree is minimised and you should
not get a response time problem. Of course, you now get mouseover on
the form and have to highlight the 'labels' yourself. That search may
take a little time, too.



Mon, 07 Dec 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. adding lots and lots of pictures to the executable

2. Slow Responses plus lots of ODBC errors

3. Slow: lots of entries in a listview

4. How to change contents of drop-down-fields in a lot of documents

5. VB Subclassing slows things down.

6. Lots of controls

7. Resize, Form with lots of controls on it

8. Loading a lot of items in a treeview control

9. ADO controls seem use a lot of memory

10. Compact lots & lots of databases!! .... hmm

11. Design Pattern : Lots of members (potentially Null) or Lots of small classes?

12. Thanks a lot

 

 
Powered by phpBB® Forum Software