You are welcome William!
William Fields (4/11/2011)
First, I imagine the call to MyBase.OnLoad(e) is what would cause the ParentFormLoading event to fire, which means the BO's would have all thier data at that point, correct?Yes and no. You are responsible for loading the data into the BO, for that you can use whatever event you prefer that will suit your application's needs. In my case, I prefer to always have a custom method responsible for loading the data, in this form, I created the
LoadAllDataForScheduler() which will simply do just that, fill the BOs needed by the form with the correct data so I can use them later. In this particular case, I do that in the DoWork event of the background worker object (see .Net help or Google for more info). Again, this is the way I have found the correct timing to work so it will show the form to the user and then a wait window letting then know that the data is being loaded. I am sure there are other ways to do the same, and probably easier.
Private Sub bwMainData_DoWork(sender As System.Object, e As System.ComponentModel.DoWorkEventArgs) Handles bwMainData.DoWork
Me.LoadAllDataForScheduler(Me, New EventArgs)
End Sub
William Fields (4/11/2011)
Second, I'm very interested in the multithreading capabilities in SF. You're example is right on target and I will be able to incorporate it into my sample app.Yes, Background workers are very easy to use without all the complications of having to handle all the multithreading complexities of the past. VS 2010 added a lot of functionality for more complex operation like Task, but in this case a simple Background Worker will do the trick easier.
Edhy Rijo