P
p19010101
Basically I need to populate a form's listview with entries from a DB
table, the form is called by the main form. All these is fine.
However, the population may take a long time due to the size of the
table, so I chucked in the DoEvents method in the loop to allow screen
repaint and such.
The problem comes when the user decided to close the form instead of
waiting, that's when the "Cannot Access A Disposed Object" exception
pops up. I understand the reason behind is that the listview is not
longer there. Is there a way to handle this?
table, the form is called by the main form. All these is fine.
However, the population may take a long time due to the size of the
table, so I chucked in the DoEvents method in the loop to allow screen
repaint and such.
The problem comes when the user decided to close the form instead of
waiting, that's when the "Cannot Access A Disposed Object" exception
pops up. I understand the reason behind is that the listview is not
longer there. Is there a way to handle this?