I have this code for a menu in my main form:
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.VB Code:
Private Sub mnuProcessData_Click() 'Load a from where some math calculations 'are performed on a large array of data frmDataProcess.Show 1 'After the processing, the processed data 'which were plotted on a picturebox must 'be replotted as they have changed UpdateEverything End Sub
It works well, but after I click on 'Close', frmDatProcess remains visible for awhile, which I don't like. Any ideas to avoid this?




Reply With Quote