Faster repaint

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Víctor

    Faster repaint

    Hello, I'm doing a Intranet application which shows some information panels
    dinamically. Each panel is a dll loaded dinamically using Reflection and
    inherits from Panel class. To display information, I use controls inheriteds
    from ListView with updated styles
    (this.SetStyle( ControlStyles.C ontainerControl | ControlStyles.R esizeRedraw |
    ControlStyles.A llPaintingInWmP aint | ControlStyles.D oubleBuffer |
    ControlStyles.U serPaint | ControlStyles.S upportsTranspar entBackColor,tr ue);
    ) to make it transparent and view intranet background (corporative image).
    Each time that user select a item, listview is invalidated to redraw its
    content. At OnEvent method, I repaint each element drawing a rectangle
    around selected item, and setting their FontStyle to Bold. FontStyle to the
    rest of element is Regular. Also, I added a collection of images to add high
    resolution images (png) with transparency level to each ListViewItem which
    also are drawn when control is repainted.

    The problem of that solution is execution slowness due to continuous
    repaintings and image and text positioning calculations. I need a
    alternative solution, because some machines which will execute intranet are
    a bit slow and haven't very good graphical configuration, but I've been
    searching a faster solution and I haven't found. Could you help me, please?

    Thanks.
    Víctor.


Working...