I have this code for a menu in my main form:
VB Code:
  1. Private Sub mnuProcessData_Click()
  2.     'Load a from where some math calculations
  3.     'are performed on a large array of data
  4.     frmDataProcess.Show 1
  5.     'After the processing, the processed data
  6.     'which were plotted on a picturebox must
  7.     'be replotted as they have changed
  8.     UpdateEverything
  9. End Sub
In frmDataProcess is a 'Close' command button which unloads the form so control is returned to the main form and sub UpdateEverything which is fairly time-consuming takes over.
It works well, but after I click on 'Close', frmDatProcess remains visible for awhile, which I don't like. Any ideas to avoid this?