Optimize PaintEvent on WinForms?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kenneth Siewers Møller

    Optimize PaintEvent on WinForms?

    Hi there

    I have a rather annoying problem. In .NET 1.1 I could have 20 controls
    (labels, textboxes etc) without any problem and the painting went
    satisfying. Now in .NET 2.0 whenever I have more that about 5-10 controls on
    one form, the painting is extremely slow. I use a lot of nesting with
    usercontrols inside tabpages and so on, but why is it so slow compared to
    1.1 and how can I make the painting faster?

    I've searched the web for solutions, bu no luck... (I have read the
    Microsoft article about the same subject, but that didn't help)

    Sincerely Kenneth Siewers


  • Frank Rizzo

    #2
    Re: Optimize PaintEvent on WinForms?

    Same problem here. I've tried disabling controls, hiding, calling
    interop to stop them from updating, etc... all to no avail.

    I'd love to see a solution to this.

    Kenneth Siewers Møller wrote:[color=blue]
    > Hi there
    >
    > I have a rather annoying problem. In .NET 1.1 I could have 20 controls
    > (labels, textboxes etc) without any problem and the painting went
    > satisfying. Now in .NET 2.0 whenever I have more that about 5-10 controls on
    > one form, the painting is extremely slow. I use a lot of nesting with
    > usercontrols inside tabpages and so on, but why is it so slow compared to
    > 1.1 and how can I make the painting faster?
    >
    > I've searched the web for solutions, bu no luck... (I have read the
    > Microsoft article about the same subject, but that didn't help)
    >
    > Sincerely Kenneth Siewers
    >
    >[/color]

    Comment

    • Kenneth Siewers Møller

      #3
      Re: Optimize PaintEvent on WinForms?

      It is really frustrating not to be able to create a fast and smooth running
      application, just because the control painting is so slow. I thought at
      first it had something to do with the new visual styles integrated in 2.0
      and the transparent property available for backcolors. It seemed to make a
      little difference changing containercontro ls backcolor to some solid
      instead, but still... come on!

      I surely hope MS is aware of this issue and are working on it as we speak.

      /Kenneth

      "Frank Rizzo" <frizzo@notn.co m> skrev i en meddelelse
      news:Oc6pXcLTGH A.3192@TK2MSFTN GP09.phx.gbl...[color=blue]
      > Same problem here. I've tried disabling controls, hiding, calling interop
      > to stop them from updating, etc... all to no avail.
      >
      > I'd love to see a solution to this.
      >
      > Kenneth Siewers Møller wrote:[color=green]
      >> Hi there
      >>
      >> I have a rather annoying problem. In .NET 1.1 I could have 20 controls
      >> (labels, textboxes etc) without any problem and the painting went
      >> satisfying. Now in .NET 2.0 whenever I have more that about 5-10 controls
      >> on one form, the painting is extremely slow. I use a lot of nesting with
      >> usercontrols inside tabpages and so on, but why is it so slow compared to
      >> 1.1 and how can I make the painting faster?
      >>
      >> I've searched the web for solutions, bu no luck... (I have read the
      >> Microsoft article about the same subject, but that didn't help)
      >>
      >> Sincerely Kenneth Siewers[/color][/color]


      Comment

      • Mark Ingram

        #4
        Re: Optimize PaintEvent on WinForms?

        Kenneth Siewers Møller wrote:[color=blue]
        > Hi there
        >
        > I have a rather annoying problem. In .NET 1.1 I could have 20 controls
        > (labels, textboxes etc) without any problem and the painting went
        > satisfying. Now in .NET 2.0 whenever I have more that about 5-10 controls on
        > one form, the painting is extremely slow. I use a lot of nesting with
        > usercontrols inside tabpages and so on, but why is it so slow compared to
        > 1.1 and how can I make the painting faster?
        >
        > I've searched the web for solutions, bu no luck... (I have read the
        > Microsoft article about the same subject, but that didn't help)
        >
        > Sincerely Kenneth Siewers
        >
        >[/color]

        I've got exactly the same problem - again, would love to hear some
        solutions for this. I too was under the impression it was transparency
        and some anti-aliasing i'm using.

        Comment

        Working...