How to Refresh controls quickly?? RRS feed

  • Question

  • Hi all,


    In my App the main form has got many controls on it. (Text Boxes, Combos, updown controls, panels)

    After running the App for about 1/2 an hour or so.... the refresh rate is so low, that it seems as if the system got hanged.

    Is there any way, I can quickly refresh the controls on the form even if the App is run for a long duration ??

    How can I solve this problem of repainting the controls on the form ?


    Anybody.....pls help me out.


    Thank you.

    Monday, June 25, 2007 5:26 AM

All replies

  • wasn't I clear in explaining my prob??


    Any body come across similar problem?? Pls help me out...how can quickly refresh my UI when my App runs for a long duration.?

    I've been using Refresh() whereever possible and ofcourse, I made all my forms' 'DoubleBuffered' property True.


    Is there anything I'm missing over here and waiting for a positive result??


    Any suggestions??


    Monday, June 25, 2007 11:25 AM
  • No, you weren't clear.  You gave no hints to what you are doing in your form to give us an idea what might cause this.  Maybe you are creating new controls and display them on top of each other so you only see one.  Just guessing of course.
    Monday, June 25, 2007 1:25 PM
  • Hi....


    No, I'm not creating any new controls  at runtime.

    As I said earlier.... my form contains may controls and ofcourse depending on the values entered by the user, there are some database operations for which I used the Background worker component.

    I thought, the database operations (reading values from the DB based on the values given in the form controls) may cause this delay and so I used the Background worker component. Yet the delay in refreshing the controls is not reduced.


    How can I minimize this and quickly refresh the controls of the form? Pls help me out....


    Thank you.


    Tuesday, June 26, 2007 4:11 AM
  • Could you provide us with more information? We don't know that what make your application refresh slowly. The only thing we know is that many controls in the main form and a background thread be used  for getting data from database. Sadly, this is not enough.


    Following methods may help you to find the source of the problem,

    a: Does your application hold a lot of CPU or memory resource?

    b: Does resource leak exist in your application?

    c: Is DB resource disposed correctly (e.g. DBConnection.Dispose)

    Thursday, June 28, 2007 7:46 AM