|
-
Jun 11th, 2012, 10:43 AM
#16
Re: Background Worker & Progress (reporting to the default instance of the main form)
It's not necessarily a bad thing to try to move code out of a form. Ideally, forms should deal with presentation and nothing else, so likely this background task actually does belong outside. That said, what you would normally do is define a class that was responsible for this task. You would create an instance and then tell it to do its job. That instance could then raise an event to indicate a change in progress and your form would handle that event and then update the UI accordingly. As you can see, the form handles the presentation aspect without doing the actual work. You could still use an event with a module if you wanted to.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|