hi all,
i have a form that takes a long time to open (because of the volume of data and the devexpress scheduler controls on it). I would like to pop up a progress bar (embedded in a form) to show until the form loads and is finished loading.
i added two public methods in the My.MyApplication class...the form with the progress bar shows, but is stuck and doesn't animate.
i figure that i need to open this form in a separate thread, but have done no work with multithreading.
in the My namespace in the MyApplication class, i have these two subs:
Public Sub ShowProgressBar()
frmProgress = New frmProgressBar
frmProgress.Show()
frmProgress.Refresh()
End Sub
Public Sub HideProgressBar()
frmProgress.Close()
End Sub
and when i call the form that takes a long time, i call the following code:
My.Application.ShowProgressBar() '<----showing the bar
Dim frm As New frmProjectPhaseDetail(a, b, c)
frm.MdiParent = Me.ParentForm
frm.Show()
My.Application.HideProgressBar() '<-----form finished loading
is there an easy way to make this form always open in a different thread so that it will animate and show my "loading.." marquee? would this be the best solution for this?
thanks in advance!
i have a form that takes a long time to open (because of the volume of data and the devexpress scheduler controls on it). I would like to pop up a progress bar (embedded in a form) to show until the form loads and is finished loading.
i added two public methods in the My.MyApplication class...the form with the progress bar shows, but is stuck and doesn't animate.
i figure that i need to open this form in a separate thread, but have done no work with multithreading.
in the My namespace in the MyApplication class, i have these two subs:
Public Sub ShowProgressBar()
frmProgress = New frmProgressBar
frmProgress.Show()
frmProgress.Refresh()
End Sub
Public Sub HideProgressBar()
frmProgress.Close()
End Sub
and when i call the form that takes a long time, i call the following code:
My.Application.ShowProgressBar() '<----showing the bar
Dim frm As New frmProjectPhaseDetail(a, b, c)
frm.MdiParent = Me.ParentForm
frm.Show()
My.Application.HideProgressBar() '<-----form finished loading
is there an easy way to make this form always open in a different thread so that it will animate and show my "loading.." marquee? would this be the best solution for this?
thanks in advance!