Refresh problem

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

Guest

I have a Winform that instantiates a class and then calls a subroutine in
that class.

This routine is extremely long and database intensive and I am trying to
display its progress by raising an event each time a record is processed.
The Winform is supposed to catch this event and update a progress bar.
Unfortunately nothing is happening. The app appears too busy to repaint.

In general, what are the potential issues here and what would be the best
course of action? (I'm going to try a Me.Refresh call in the event handling
routine. Any potential drawbacks to this, besides performance?)
 
Yes a refresh call will update the interface.
The only problem I have ever encountered with this is a slight performance
loss.

Additionally if you are trying to update the winform from a different thread
you will have to set a callback if Control.InvokeRequired == true on the
control you are trying to update, else it will just hang.

Jax
 
That is pretty much what I expected. This program has a display mode and a
'hidden' mode (no events) and the display mode is not expected to be as fast.

I am not doing anything with threading, so I suppose that does not apply.

Thanks!
 
Back
Top