Hiding a Progress Indicator Modal Form

  • Thread starter Thread starter Keith Rebello
  • Start date Start date
K

Keith Rebello

I am writing a program that analyzes a reinforced concrete column section.
The main form has an "Analysis" menu item that calls the main analysis
routines in a ColumnSection class. It also opens a modal form containing a
progress bar which shows the progess of the analysis.
i.e. FormProgress.ShowDialog
ColumnSection.Analyze

In the ColumnSection class I raise an event that updates the progress:
RaiseEvent OverallProgress(iProgress)

In the FormProgress form I handle the event as follows:
Private Sub Progress(iProgress as integer) Handles
ColumnSection.OverallProgress
pgBar.value = iProgress
If iProgress = 100 then '100 is the maximum value
debug.writeline("Finished!")
Me.Hide
End If
End Sub

I know that the subroutine enters the If block, but FormProgress does not
hide itself. What am I doing wrong? How do I hide "FormProgress" when the
analysis is complete and return to the application?
 
I think you'll need to close the form and not hide the form.
The form is modal so returning to the application can only happen if the
form is closed.
 
That is not true. I hide and show a lot of other modal forms in the
application. The other forms are closed in Button_Click events on those
forms.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top