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?
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?