Running into a situation when user searches for orders of customer for past 4 years. As the DB query takes a long time, I want to show a pop up box just stating ‘please wait. quering for results’. so when they start their search I want to show the message box until the results are obtainned and at that point I want to close the message box.
My current way, I know is incorrect as the pop up box locks up and states (not responding).
Would using a background worker be an over kill, or should I go with a progress bar?
My current way:
Dim frmProcessing As New ShowWaitForm
'/ set location to open the form
'/ set any custom message
frmProcessing.Show()
'//do db query and other stuff with result-> i CANNOT CHANGE THIS CALL NOR CAN I MODIFY HOW IT IS CALLED/FUNCTIONS
frmProcessing.Close()
frmProcessing = Nothing
I personally find the background worker to be a better choice most of the time. It allows me some more flexibility later if I want to add more information. I can use the ProgressChanged event to update a progress bar, and later if my needs change I can do other things as well.