Results 1 to 4 of 4

Thread: Improving redraw performance with threading.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2004
    Posts
    95

    Improving redraw performance with threading.

    Is it possible to do this? I have noticed that dragging a .net window around on the screen doesn't refresh as quickly as some of the other applications I have seen, and I was wondering if there was any possible way to use code to fix this. Anyone know if it has been done?

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Depends if any graphical operations are being called in the paint events of consituent controls.

    If you have a picturebox that draws a complex shape every time the paintbox paints itself then you can save time by drawing it once to a bitmap object behind the scenes and then simply drawing that bitmap to the picturebox in the paint() event.

    The extra complexity in threading something like this would probably slow things down further. Although you could thread the actual bitmap drawing quite sucessfully.
    I don't live here any more.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2004
    Posts
    95
    Nope, no graphical operations here. Just a dozen controls on a form that slow down the redraw rate of the form when I drag it across the screen.

  4. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Probably not much you can do then. Look into SuspendLayout and ResumeLayout functions, they are usually used when initialising a form but they might be applicable here.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width