Visible = false becomes slow after a while.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I have an application than becomes slow after it has been running for a day or two
I becomes slow all the sudden, and stays slow
I can see than the memory-usage is steady

I have narrowed the bug down to lines, in the code, where I set "Visible = false;" for listboxes and NumericUpDowns
This operation will take 8 seconds when it is slow and less than 1 ms, when it is running normally.

Can anybody help me please ?
 
I have found the bug

The system will try to set focus to another feild, when Visible is set to false. But none of the other elements on the form can get focus
This functionallity becomes slower each time the setnextfucus-function is called, so I thing that some kind of list isn't cleared before the system looks for another item that can get the focus.
 
Back
Top