Hi, my issue is the following:
I have a windows form in which I've placed a LayoutPanel, when the forms Loads, multiple controls like: textboxes and labels are being added to the LayoutPanel.
Then on a button click, I need to process the data entered by the user on those dynamically created controls. For that purpouse I use a Backgroun...
I have an asp.net application with a background thread. The thread starts when the application starts and it is gracefully stopped when the application ends. I am running the website on a shared host. Unfortunately sometimes the application does not trigger the Application_End event when it ends. I would think that the threads would be k...
In the code below, is there a way to instead of always subscribing the updateWorker_DoWork method, pass it a method like this
public void GetUpdates(SomeObject blah)
{
//...
updateWorker.DoWork += new DoWorkEventHandler(blah);
//...
}
public void GetUpdates()
{
//Set up worker
updateWorker.WorkerReportsProgress = t...
Short question:
I would like to spawn a single background thread that would process work items submitted to a queue (like a threadpool with one thread). Some of the work items are capable of reporting progress, some are not. Which one of the .NET's myriad of multithreading approaches should I use?
Long explanation (to avoid asking ab...
I changed accidentally the value of a BusinessObject-property that implements INotifyPropertyChanged from within a BackgroundWorker (BackgroundWorker.DoWork).
Amazingly, this led not to an error but actualized the text of the TextBlock that was bound to the property without any complaint.
Is the execution of asynchronous bindings par...
I want to run an operation on a background thread. When it has completed I want to check for any errors that occurred and re-throw them on my original thread.
I am using a backgroundworker. Throwing an exception in the RunWorkerCompleted event handler results in an unhandled exception - this makes sense if the eventhandler is running o...
Hi,
I'm in trouble when using the background worker to create my object model.
As I understand why, I'm unable to find a workaround.
Here is the pseudo logic :
Call Webservice async
When received, open a background worker, and load data into controls in the background
in the Load method, search for an existing object and if not foun...
Hello All,
I want to run my VB6 application in background or invisible to user.
How can we achieve it?
...
Does the task parallel library have anything that would be considered a replacement or improvement over the BackgroundWorker class?
I have a WinForms application with a wizard-style UI, and it does some long-running tasks. I want to be able to have a responsive UI with the standard progress bar and ability to cancel the operation. I've...
Hi,
I'm using .net 2.0 and I've created a form (System.Windows.Forms.Form) for displaying information during long running tasks.
When I start a long running task, I create a new instance of this form, call .Show() and start the BackgroundWorker. But even though I use a BackgroundWorker for doing the work, the form indeed shows up, but...
I have an ASP.NET site and I've been doing some work refactoring code to try to remove some long running processes (in the order of an hour) from the actual http Request by creating a BackgroundWorker and sending the work off to that to process. This was running fine on cutdown tests but when I applied the logic to the real code I found ...
So from what I've known, if I do an AsyncTask inside an Activity, the task may be killed when user quits the Activity before it is finished. One solution I've seen is using IntentService, which the system will try hard not to kill.
My problem is that IntentService only uses one background thread to run all the tasks one by one. I have s...
No exception is thrown, function just halts at this statement:
int productQuantity = Convert.ToInt32("1.00");
and returns.
What am I doing wrong to convert this float to Int32?
Note: I am running in a BackgroundWorkerThread.
...
I have a ListBox bound to an ObservableCollection. The items in the collection each signify a different step with a method to perform that step. What I would like to do is have a BackgroundWorker loop through the collection, run each item's action method, and have the current step be reflected by the ListBox.
My first iteration used n...
Our group read the widely referenced article http://blog.quantumbitdesigns.com/2008/07/22/wpf-cross-thread-collection-binding-part-4-the-grand-solution/ and wondered if any of you could help with our problem:
A team member has a WPF application that has an animation running. The problem is that performing background tasks even on differ...
I'm aware, and use, the xxx.Dispatcher.Invoke() method to get the background thread to manipulate GUI elements. I think I'm bumping up against something similar, but slightly different, where I want a long running background task to construct a tree of objects and when done hand it to the GUI for display.
Attempting to do that results i...
I have a background worker that's checking the status of four services on a remote server.
This is setup on a timer (5 Seconds) as below. For some reason it's hanging the UI thread causing the application to 'lock' for a second each tick, I cannot work out why?!
Private Sub ServiceTimer_Tick(ByVal sender As System.Object, ByVal e As Sys...
I have all my data bound from WPF controls to properties in an object that my Window can access. When I run a backgroundworker thread, do I need a dispatcher to access these underlying properties, or since I'm not explicitly accessing the UI controls, is that handled automatically by the mechanism binding the XAML to the code properties...
Hello everyone,
I am stuck since few days on a bug in my app, and I require help.
Main thread contains time consuming operation. To be more friendly with user, I created a static class Info, which contains to methods ShowInfo and StopInfo.
ShowInfo basically start a backgroundWorker. backgroundWorker operation is :
Create a form
sh...
Hi,
Need help on how to use .Net's Backgroundworker thread for the following purpose to increase UI responsiveness and performance in my .Net winforms application.Since am new to .Net/C#, any code would be helpful.
When user clicks "Calculate" button in UI form,
1.Get a list of categories C from database[this is typically around 10]
...