G
Guest
Hi all
Got a problem with my application. Whenever I close a form that's been shown through ShowDialog() and go back to the parent form, whatever is running behind my app (Usually VS), appears very briefly - and creates a flickering effect
I've enabled double buffering on all my forms, and it has improved it somewhat, but it still occurs
The problem I think is that I am calling Dispose() on each form in the Closed event. This is because we've found that DotNet often doesn't garbage collect instances of forms if they aren't explicitly disposed, so we call
this.Dispose(true)
GC.SuppressFinalize(this)
in the Closed event. If we don't do this our app quickly starts chewing up memory and on low-end machines causes thrashing.
I tried not calling dispose on some forms and the flickering disappeared
So the question is, has anyone had this problem or does anyone have any ideas as to how to reduce the flickering and still allow the GC to collect the forms correctly
Thanks in advance
Simon
Got a problem with my application. Whenever I close a form that's been shown through ShowDialog() and go back to the parent form, whatever is running behind my app (Usually VS), appears very briefly - and creates a flickering effect
I've enabled double buffering on all my forms, and it has improved it somewhat, but it still occurs
The problem I think is that I am calling Dispose() on each form in the Closed event. This is because we've found that DotNet often doesn't garbage collect instances of forms if they aren't explicitly disposed, so we call
this.Dispose(true)
GC.SuppressFinalize(this)
in the Closed event. If we don't do this our app quickly starts chewing up memory and on low-end machines causes thrashing.
I tried not calling dispose on some forms and the flickering disappeared
So the question is, has anyone had this problem or does anyone have any ideas as to how to reduce the flickering and still allow the GC to collect the forms correctly
Thanks in advance
Simon