Reputation: 141
Do visual basic forms each run in separate memory and if not is there a way that I can force them to do so. I want them to be in separate memory so that if one form freezes the entire program won't.
Upvotes: 0
Views: 160
Reputation: 5086
Jon Skeet's gives you the idea but here's the specific class & code snippet to create responsive UI.
class: BackgroundWorker
code snippet: Using BackgroundWorker class for long running processes in WPF or Silverlight
Upvotes: 0
Reputation: 1501163
You're really asking about separate threads rather than separate memory. If you have several forms within the same application, they will usually run within the same thread. While you can force each window to use a different thread, that will make your life much more complicated at other times.
I would recommend that instead of trying to work around the problem of one form freezing, you simply fix it so that it doesn't freeze. To do that, you should avoid doing significant amounts of work on the UI thread - you should use background threads or asynchronous operations to avoid blocking the UI thread.
Upvotes: 2